mirror of
https://github.com/FunAudioLLM/SenseVoice.git
synced 2025-09-15 15:08:35 +08:00
20 lines
561 B
Python
20 lines
561 B
Python
#!/usr/bin/env python3
|
|
# -*- encoding: utf-8 -*-
|
|
# Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights Reserved.
|
|
# MIT License (https://opensource.org/licenses/MIT)
|
|
|
|
from model import SenseVoiceSmall
|
|
|
|
model_dir = "iic/SenseVoiceSmall"
|
|
m, kwargs = SenseVoiceSmall.from_pretrained(model=model_dir)
|
|
|
|
|
|
res = m.inference(
|
|
data_in="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav",
|
|
language="auto", # "zn", "en", "yue", "ja", "ko", "nospeech"
|
|
use_itn=False,
|
|
**kwargs,
|
|
)
|
|
|
|
print(res)
|