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.5k stars 689 forks source link

funasr1.0是否支持自定义ngram模型 #1325

Closed JVfisher closed 8 months ago

JVfisher commented 8 months ago

我使用目前的funasr最新源码安装后运行以下代码未报错,但结果中并没有体现语言模型的效果,请问是不是现在不支持这种用法?如果支持,能否给一个使用本地语言模型的案例

from funasr import AutoModel model = AutoModel(model="iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch", model_revision="v2.0.4", vad_model="fsmn-vad", vad_model_revision="v2.0.4",#'iic/speech_fsmn_vad_zh-cn-8k-common', vad_model_revision="v2.0.4", punc_model="ct-punc-c", punc_model_revision="v2.0.4", lm_dir ='/content/drive/MyDrive/20231225funasr/20240129lm/resource', lm_weight=0.2, beam_size=30, max_single_segment_time = 12000, )

LauraGPT commented 8 months ago

Ngram is only supported in c++ runtime.

JVfisher commented 8 months ago

Ngram is only supported in c++ runtime.

Are there any documents or examples that can help me to write th code to use lm?