FunASR icon indicating copy to clipboard operation
FunASR copied to clipboard

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

Open ArboterJams opened this issue 1 year ago • 0 comments
trafficstars

问题

  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)

环境

  • Ubuntu
  • FunASR 1.0.22

ArboterJams avatar Apr 10 '24 01:04 ArboterJams