We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python版本的输出
from funasr import AutoModel model = AutoModel(model="iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch", model_revision="v2.0.4", # vad_model="damo/speech_fsmn_vad_zh-cn-16k-common-pytorch", # vad_model_revision="v2.0.4", # punc_model="damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch", # punc_model_revision="v2.0.4", ) wav_path = 'https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav' res = model.generate(input=wav_path, hotword='达摩院', batch_size_s=300) print(res) rtf_avg: 0.176: 100%|██████████| 1/1 [00:00<00:00, 1.02it/s] [{'key': 'rand_key_2yW4Acq9GFz6Y', 'text': '欢 迎 大 家 来 体 验 达 摩 院 推 出 的 语 音 识 别 模 型', 'timestamp': [[870, 1110], [1110, 1350], [1370, 1530], [1530, 1770], [1770, 2010], [2010, 2170], [2170, 2410], [2490, 2650], [2650, 2830], [2830, 3030], [3030, 3230], [3230, 3470], [3470, 3710], [3710, 3950], [3950, 4190], [4210, 4410], [4410, 4610], [4610, 4830], [4830, 5245]]}]
onnx版本的输出
from funasr_onnx import SeacoParaformer from pathlib import Path model_dir = "iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch" model = SeacoParaformer(model_dir, quantize=True, batch_size=1) wav_path = ['{}/.cache/modelscope/hub/{}/example/asr_example.wav'.format(Path.home(), model_dir)] hotwords = '魔搭' result = model(wav_path, hotwords) print(result) [{'preds': ('欢迎大家来到魔搭社区进行体验', ['欢', '迎', '大', '家', '来', '到', '魔', '搭', '社', '区', '进', '行', '体', '验'])}]
如上所述,python版本的输出是携带时间戳的,onnx版本的是没有时间戳的。
跟踪源码,发现前者在这里会处理时间戳 但是后者在执行完推理之后,没有更多的操作
请问有什么方式可以让onnx也可以输出时间戳吗?
The text was updated successfully, but these errors were encountered:
+1, 请问现在解决了吗,之前用vad_paraformer_onnx 的时间戳不太准,现在想用seaco_paraformer_onnx
Sorry, something went wrong.
问题已解决,我做了些修改,参考这个 https://github.com/coolEphemeroptera/funasr_seaco_paraformer_onnx_with_timestamp
好的,非常感谢!!!我试一下。
No branches or pull requests
python版本的输出
onnx版本的输出
如上所述,python版本的输出是携带时间戳的,onnx版本的是没有时间戳的。
Before asking:
跟踪源码,发现前者在这里会处理时间戳
但是后者在执行完推理之后,没有更多的操作
请问有什么方式可以让onnx也可以输出时间戳吗?
The text was updated successfully, but these errors were encountered: