diff --git a/README.md b/README.md index 334b292..1164fb1 100644 --- a/README.md +++ b/README.md @@ -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) ``` diff --git a/README_zh.md b/README_zh.md index d0a7613..be7f67d 100644 --- a/README_zh.md +++ b/README_zh.md @@ -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) ``` diff --git a/demo2.py b/demo2.py index e97e48d..c9dfae7 100644 --- a/demo2.py +++ b/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)