FunASR icon indicating copy to clipboard operation
FunASR copied to clipboard

automodel推理

Open wwfcnu opened this issue 1 year ago • 3 comments

from funasr import AutoModel
# paraformer-zh is a multi-functional asr model
# use vad, punc, spk or not as you need
model = AutoModel(model="paraformer-zh",  vad_model="fsmn-vad",  punc_model="ct-punc", 
                  # spk_model="cam++", 
                  )
res = model.generate(input=f"{model.model_path}/example/asr_example.wav", 
                     batch_size_s=300, 
                     hotword='魔搭')
print(res)

model的vad和punc是默认开启的吧,如果我不要vad,punc_model,怎么设置参数,写成下面这样吗 model =AutoModel(model="paraformer-zh", vad_model="", punc_model="")

wwfcnu avatar Jul 03 '24 05:07 wwfcnu