| | |
| | | import soundfile |
| | | from funasr_onnx import Fsmn_vad_online |
| | | import soundfile |
| | | 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_dir = "/mnt/ailsa.zly/tfbase/espnet_work/FunASR_dev_zly/export/damo/speech_fsmn_vad_zh-cn-16k-common-pytorch" |
| | | wav_path = "/mnt/ailsa.zly/tfbase/espnet_work/FunASR_dev_zly/egs_modelscope/vad/speech_fsmn_vad_zh-cn-16k-common/vad_example_16k.wav" |
| | | model = Fsmn_vad_online(model_dir) |
| | | |
| | | |
| | |
| | | segments_result = model(audio_in=speech[sample_offset: sample_offset + step], |
| | | param_dict=param_dict) |
| | | if segments_result: |
| | | print(segments_result) |
| | | |
| | | print(segments_result) |