modelscope-funasr要么报错要么识别为空,为什么?
res = model.generate(input="voice.wav", batch_size_s=300, hotword='魔搭')
0%| | 0/1 [00:01<?, ?it/s]
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\DGG\AppData\Roaming\Python\Python310\site-packages\funasr\auto\auto_model.py", line 263, in generate
return self.inference_with_vad(input, input_len=input_len, cfg)
File "C:\Users\DGG\AppData\Roaming\Python\Python310\site-packages\funasr\auto\auto_model.py", line 334, in inference_with_vad
res = self.inference(
File "C:\Users\DGG\AppData\Roaming\Python\Python310\site-packages\funasr\auto\auto_model.py", line 300, in inference
res = model.inference(batch, kwargs)
File "C:\Users\DGG\AppData\Roaming\Python\Python310\site-packages\funasr\models\fsmn_vad_streaming\model.py", line 722, in inference
segments_i = self.forward(batch)
File "C:\Users\DGG\AppData\Roaming\Python\Python310\site-packages\funasr\models\fsmn_vad_streaming\model.py", line 566, in forward
self.DetectLastFrames(cache=cache)
File "C:\Users\DGG\AppData\Roaming\Python\Python310\site-packages\funasr\models\fsmn_vad_streaming\model.py", line 772, in DetectLastFrames
frame_state = self.GetFrameState(
File "C:\Users\DGG\AppData\Roaming\Python\Python310\site-packages\funasr\models\fsmn_vad_streaming\model.py", line 522, in GetFrameState
speech_prob = math.log(sum_score)
ValueError: math domain error
先用例子测试,没问题再换自己音频,如果出问题,再去对比音频本身。
此回答整理自钉群“modelscope-funasr社区交流”