粤语微调 speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch
paraformer model
- | model id |
---|---|
model | iic/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch |
prepare data
- | data id |
---|---|
data | modelscope/speech_asr_commonvoice_cantonese-CHS_trainsets |
infer / 推理
common_voice_yue_31189594.wav 睇我几有礼貌去之前讲返声
# from funasr.runtime.python.onnx.runtime_recognizer import ONNXRuntimeRecognizer
input="/media/wmx/soft1/huggingface_cache/data/speech_asr_commonvoice_cantonese-CHS_trainsets/test/common_voice_yue_31189594.wav"
# input="/media/wmx/soft1/AI-model/FunASR/asr_example_zh.wav"
# input="/media/wmx/soft1/AI-model/FunASR/asr_example_en.wav"
model_dir="/media/wmx/soft1/huggingface_cache/out_models/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch-lora"
# model_dir="/media/wmx/soft1/huggingface_cache/hub/iic/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch"
from funasr import AutoModel
model = AutoModel(model=model_dir)
res = model.generate(input=input)
print(res)
result :
[
{'key': 'common_voice_yue_31189594',
'text': '睇 我 几 有 礼 貌 去 之 前 返 声',
'timestamp': [[1410, 1650], [1730, 1970], [2050, 2270], [2270, 2470], [2470, 2690], [2690, 2930], [3230, 3470], [3550, 3770], [3770, 4010], [4010, 4250], [4270, 4490]]}
]
- Downloads last month
- 4