from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
inference_pipeline = pipeline(
task=Tasks.voice_activity_detection,
model='damo/speech_fsmn_vad_zh-cn-16k-common-pytorch',
model_revision=None,
output_dir='output_dir',
)
# segments_result = inference_pipeline(audio_in="yes/wav.scp")
segments_result = inference_pipeline(audio_in="yes/wav.scp")
print(segments_result)
Traceback (most recent call last): File "vad.py", line 20, in segments_result = inference_pipeline(audio_in="yes/wav.scp") File "/opt/conda/lib/python3.7/site-packages/modelscope/pipelines/audio/voice_activity_detection_pipeline.py", line 143, in call output = self.forward(self.audio_in, **kwargs) File "/opt/conda/lib/python3.7/site-packages/modelscope/pipelines/audio/voice_activity_detection_pipeline.py", line 223, in forward self.cmd['name_and_type'] = data_cmd UnboundLocalError: local variable 'data_cmd' referenced before assignment
提问格式:
OS: [e.g. linux] 说明操作系统 Python/C++ Version:说明语言及版本号 Package Version:pytorch、modelscope与funasr版本 Model:什么模型 Command:运行命令和输入 问题描述: Error log:错误提示
请按照上面格式提问,我这边尝试按照pipeline调vad wav.scp没有问题。 欢迎加入钉钉群进行答疑,群号27215013275