Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.
Python asraudiochineseemotion-recognitionfunasrmcp-servermultilingual-asropenai-compatible-apiparaformerpunctuationpytorchreal-time-asrspeaker-diarizationspeech-recognitionspeech-to-textstreaming-asrtranscriptionvllmvoice-activity-detectionwhisper-alternative
fix expired link in python onnxruntime readme (#1013)
Meng Wei8a16e1c13e91
diff --git a/funasr/runtime/python/onnxruntime/README.md b/funasr/runtime/python/onnxruntime/README.mdindex e9fa80cef..ceeb45983 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+```shellpip install -U funasr-onnx# For the users in China, you could install with the command:@@ -27,7 +27,9 @@ pip install -e ./## Inference with runtime### Speech Recognition+#### Paraformer+```pythonfrom funasr_onnx import Paraformerfrom pathlib import Path@@ -40,6 +42,7 @@ wav_path = ['{}/.cache/modelscope/hub/damo/speech_paraformer-large_asr_nat-zh-cnresult = 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 @@ Output: `List[str]`: recognition result#### Paraformer-online### Voice Activity Detection+#### FSMN-VAD+```pythonfrom funasr_onnx import Fsmn_vadfrom pathlib import Path@@ -66,6 +71,7 @@ model = Fsmn_vad(model_dir)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 @@ Input: wav formt file, support formats: `str, np.ndarray, List[str]`Output: `List[str]`: recognition result-#### FSMN-VAD-online+```pythonfrom funasr_onnx import Fsmn_vad_onlineimport soundfile@@ -108,6 +114,7 @@ for sample_offset in range(0, speech_length, min(step, speech_length - sample_ofif 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 @@ Input: wav formt file, support formats: `str, np.ndarray, List[str]`Output: `List[str]`: recognition result-### Punctuation Restoration+#### CT-Transformer+```pythonfrom funasr_onnx import CT_Transformer@@ -131,6 +139,7 @@ text_in="跨境河流是养育沿岸人民的生命之源长期以来为帮助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 @@ Input: `str`, raw text of asr resultOutput: `List[str]`: recognition result-#### CT-Transformer-online+```pythonfrom funasr_onnx import CT_Transformer_VadRealtime@@ -159,6 +168,7 @@ for vad in vads: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 @@ Output: `List[str]`: recognition result## 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).