mirror of
https://github.com/FunAudioLLM/SenseVoice.git
synced 2025-09-15 15:08:35 +08:00
sensevoice
This commit is contained in:
parent
198048affa
commit
586287df30
@ -160,13 +160,13 @@ 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",
|
||||
data_in=f"{kwargs['model_path']}/example/en.mp3",
|
||||
language="auto", # "zn", "en", "yue", "ja", "ko", "nospeech"
|
||||
use_itn=False,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
text = rich_transcription_postprocess(res[0]["text"])
|
||||
text = rich_transcription_postprocess(res[0][0]["text"])
|
||||
print(text)
|
||||
```
|
||||
|
||||
|
||||
@ -164,13 +164,13 @@ 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",
|
||||
data_in=f"{kwargs['model_path']}/example/en.mp3",
|
||||
language="auto", # "zn", "en", "yue", "ja", "ko", "nospeech"
|
||||
use_itn=False,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
text = rich_transcription_postprocess(res[0]["text"])
|
||||
text = rich_transcription_postprocess(res[0][0]["text"])
|
||||
print(text)
|
||||
```
|
||||
|
||||
|
||||
4
demo2.py
4
demo2.py
@ -12,11 +12,11 @@ m, kwargs = SenseVoiceSmall.from_pretrained(model=model_dir)
|
||||
|
||||
|
||||
res = m.inference(
|
||||
data_in=f"{m.model_path}/example/en.mp3",
|
||||
data_in=f"{kwargs['model_path']}/example/en.mp3",
|
||||
language="auto", # "zn", "en", "yue", "ja", "ko", "nospeech"
|
||||
use_itn=False,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
text = rich_transcription_postprocess(res[0]["text"])
|
||||
text = rich_transcription_postprocess(res[0][0]["text"])
|
||||
print(text)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user