Skip to content
New issue

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

如何加载多个.onnx模型,对同一个音频处理 #1939

Open
viviliuwqhduhnwqihwqwudceygysjiwuwnn opened this issue Jul 22, 2024 · 0 comments
Labels
question Further information is requested

Comments

@viviliuwqhduhnwqihwqwudceygysjiwuwnn

from funasr_onnx import Fsmn_vad
from pathlib import Path

model_dir = "damo/speech_fsmn_vad_zh-cn-16k-common-pytorch"
wav_path = '{}/.cache/modelscope/hub/damo/speech_fsmn_vad_zh-cn-16k-common-pytorch/example/vad_example.wav'.format(Path.home())

model = Fsmn_vad(model_dir)

result = model(wav_path)
print(result)和
from funasr_onnx import Paraformer
from pathlib import Path

model_dir = r"C:.cache\modelscope\hub\damo\speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx"
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'.format(Path.home())]

result = model(wav_path)
print(result)
这两个怎么放到一起使用作用于同一个音频,输出既识别出文字又有端点检测,
类似model = AutoModel(
model="iic/SenseVoiceSmall",
vad_model="iic/speech_fsmn_vad_zh-cn-16k-common-pytorch",
vad_kwargs={"max_single_segment_time": 60000},这种效果

@viviliuwqhduhnwqihwqwudceygysjiwuwnn viviliuwqhduhnwqihwqwudceygysjiwuwnn added the question Further information is requested label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant