From 8a16e1c13e91c9a7c43ba546fd71b85765d9469f Mon Sep 17 00:00:00 2001
From: Meng Wei <wmeng94@gmail.com>
Date: 星期二, 17 十月 2023 09:57:03 +0800
Subject: [PATCH] fix expired link in python onnxruntime readme (#1013)

---
 funasr/runtime/python/onnxruntime/README.md |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/funasr/runtime/python/onnxruntime/README.md b/funasr/runtime/python/onnxruntime/README.md
index e9fa80c..ceeb459 100644
--- a/funasr/runtime/python/onnxruntime/README.md
+++ b/funasr/runtime/python/onnxruntime/README.md
@@ -1,9 +1,9 @@
 # ONNXRuntime-python
 
-
 ## Install `funasr-onnx`
 
 install from pip
+
 ```shell
 pip install -U funasr-onnx
 # For the users in China, you could install with the command:
@@ -27,7 +27,9 @@
 ## Inference with runtime
 
 ### Speech Recognition
+
 #### Paraformer
+
  ```python
 from funasr_onnx import Paraformer
 from pathlib import Path
@@ -40,6 +42,7 @@
 result = model(wav_path)
 print(result)
  ```
+
 - `model_dir`: model_name in modelscope or local path downloaded from modelscope. If the local path is set, it should contain `model.onnx`, `config.yaml`, `am.mvn`
 - `batch_size`: `1` (Default), the batch size duration inference
 - `device_id`: `-1` (Default), infer on CPU. If you want to infer with GPU, set it to gpu_id (Please make sure that you have install the onnxruntime-gpu)
@@ -53,7 +56,9 @@
 #### Paraformer-online
 
 ### Voice Activity Detection
+
 #### FSMN-VAD
+
 ```python
 from funasr_onnx import Fsmn_vad
 from pathlib import Path
@@ -66,6 +71,7 @@
 result = model(wav_path)
 print(result)
 ```
+
 - `model_dir`: model_name in modelscope or local path downloaded from modelscope. If the local path is set, it should contain `model.onnx`, `config.yaml`, `am.mvn`
 - `batch_size`: `1` (Default), the batch size duration inference
 - `device_id`: `-1` (Default), infer on CPU. If you want to infer with GPU, set it to gpu_id (Please make sure that you have install the onnxruntime-gpu)
@@ -76,8 +82,8 @@
 
 Output: `List[str]`: recognition result
 
-
 #### FSMN-VAD-online
+
 ```python
 from funasr_onnx import Fsmn_vad_online
 import soundfile
@@ -108,6 +114,7 @@
     if segments_result:
         print(segments_result)
 ```
+
 - `model_dir`: model_name in modelscope or local path downloaded from modelscope. If the local path is set, it should contain `model.onnx`, `config.yaml`, `am.mvn`
 - `batch_size`: `1` (Default), the batch size duration inference
 - `device_id`: `-1` (Default), infer on CPU. If you want to infer with GPU, set it to gpu_id (Please make sure that you have install the onnxruntime-gpu)
@@ -118,9 +125,10 @@
 
 Output: `List[str]`: recognition result
 
-
 ### Punctuation Restoration
+
 #### CT-Transformer
+
 ```python
 from funasr_onnx import CT_Transformer
 
@@ -131,6 +139,7 @@
 result = model(text_in)
 print(result[0])
 ```
+
 - `model_dir`: model_name in modelscope or local path downloaded from modelscope. If the local path is set, it should contain `model.onnx`, `config.yaml`, `am.mvn`
 - `device_id`: `-1` (Default), infer on CPU. If you want to infer with GPU, set it to gpu_id (Please make sure that you have install the onnxruntime-gpu)
 - `quantize`: `False` (Default), load the model of `model.onnx` in `model_dir`. If set `True`, load the model of `model_quant.onnx` in `model_dir`
@@ -140,8 +149,8 @@
 
 Output: `List[str]`: recognition result
 
-
 #### CT-Transformer-online
+
 ```python
 from funasr_onnx import CT_Transformer_VadRealtime
 
@@ -159,6 +168,7 @@
 
 print(rec_result_all)
 ```
+
 - `model_dir`: model_name in modelscope or local path downloaded from modelscope. If the local path is set, it should contain `model.onnx`, `config.yaml`, `am.mvn`
 - `device_id`: `-1` (Default), infer on CPU. If you want to infer with GPU, set it to gpu_id (Please make sure that you have install the onnxruntime-gpu)
 - `quantize`: `False` (Default), load the model of `model.onnx` in `model_dir`. If set `True`, load the model of `model_quant.onnx` in `model_dir`
@@ -170,8 +180,9 @@
 
 ## Performance benchmark
 
-Please ref to [benchmark](https://github.com/alibaba-damo-academy/FunASR/blob/main/funasr/runtime/python/benchmark_onnx.md)
+Please ref to [benchmark](https://github.com/alibaba-damo-academy/FunASR/blob/main/funasr/runtime/docs/benchmark_onnx.md)
 
 ## Acknowledge
+
 1. This project is maintained by [FunASR community](https://github.com/alibaba-damo-academy/FunASR).
 2. We partially refer [SWHL](https://github.com/RapidAI/RapidASR) for onnxruntime (only for paraformer model).

--
Gitblit v1.9.1