modelscope / FunASR

A Fundamental End-to-End Speech Recognition Toolkit and Open Source SOTA Pretrained Models, Supporting Speech Recognition, Voice Activity Detection, Text Post-processing etc.
https://www.funasr.com
Other
6.45k stars 687 forks source link

直接语音输入比较短的句子会出问题 #1602

Closed ArboterJams closed 2 weeks ago

ArboterJams commented 6 months ago

问题

  1. 比如语音输入“二十二”,出现TypeError: 'list' object cannot be interpreted as an integer问题
  2. 还有怎么能让输出为数字,比如电话号码

代码

funasr_model= AutoModel(model="./FunASR/paraformer-zh", vad_model="./FunASR/fsmn-vad", punc_model="./FunASR/ct-punc", device="cuda:3")
filename = "./audio.wav"
with open(filename, "wb") as f:
    f.write(recorder.export().read())
result = funasr_model.generate(input=filename)
print(result)

环境

lyblsgo commented 2 weeks ago

Let's close this issue for now. If needed, reopen it.