Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
xuning
/
sherpaonnx
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
luffy
2025-02-18 12:34:47 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2025-02-18 12:34:47 +0800
Commit
4e83b3473b5bbe30138c340dd7e3af3e5e93234a
4e83b347
1 parent
26d5f1fa
speaker-identification-with-vad-non-streaming-asr.py Lack of support for sense_voice. (#1884)
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
16 行增加
和
0 行删除
python-api-examples/speaker-identification-with-vad-non-streaming-asr.py
python-api-examples/speaker-identification-with-vad-non-streaming-asr.py
查看文件 @
4e83b34
...
...
@@ -185,6 +185,13 @@ def register_non_streaming_asr_model_args(parser):
help
=
"Feature dimension. Must match the one expected by the model"
,
)
parser
.
add_argument
(
"--sense-voice"
,
default
=
""
,
type
=
str
,
help
=
"Path to sense voice model"
,
)
def
get_args
():
parser
=
argparse
.
ArgumentParser
(
...
...
@@ -317,6 +324,15 @@ def create_recognizer(args) -> sherpa_onnx.OfflineRecognizer:
task
=
args
.
whisper_task
,
tail_paddings
=
args
.
whisper_tail_paddings
,
)
elif
args
.
sense_voice
:
assert_file_exists
(
args
.
sense_voice
)
recognizer
=
sherpa_onnx
.
OfflineRecognizer
.
from_sense_voice
(
model
=
args
.
sense_voice
,
tokens
=
args
.
tokens
,
num_threads
=
args
.
num_threads
,
use_itn
=
True
,
debug
=
args
.
debug
,
)
else
:
raise
ValueError
(
"Please specify at least one model"
)
...
...
请
注册
或
登录
后发表评论