From 0d9384c8c0161259192cc3d676ca0d60e0d18e5c Mon Sep 17 00:00:00 2001 From: zhifu gao <zhifu.gzf@alibaba-inc.com> Date: 星期一, 11 三月 2024 22:32:26 +0800 Subject: [PATCH] Dev gzf (#1474) --- README.md | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/README.md b/README.md index d159050..38fd686 100644 --- a/README.md +++ b/README.md @@ -227,6 +227,21 @@ res = model.export(quantize=False) ``` +### Text ONNX +```python +# pip3 install -U funasr-onnx +from funasr_onnx import Paraformer +model_dir = "damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch" +model = Paraformer(model_dir, batch_size=1, quantize=True) + +wav_path = ['~/.cache/modelscope/hub/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/example/asr_example.wav'] + +result = model(wav_path) +print(result) +``` + +More examples ref to [demo](runtime/python/onnxruntime) + ## Deployment Service FunASR supports deploying pre-trained or further fine-tuned models for service. Currently, it supports the following types of service deployment: - File transcription service, Mandarin, CPU version, done -- Gitblit v1.9.1