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
Fangjun Kuang
2024-01-04 12:32:19 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-01-04 12:32:19 +0800
Commit
547a22f7d93f210adb5008e0ee64410fe62f251c
547a22f7
1 parent
e215d0c3
Fix #510 (#513)
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
6 行增加
和
0 行删除
python-api-examples/non_streaming_server.py
python-api-examples/non_streaming_server.py
查看文件 @
547a22f
...
...
@@ -862,6 +862,7 @@ def create_recognizer(args) -> sherpa_onnx.OfflineRecognizer:
max_active_paths
=
args
.
max_active_paths
,
hotwords_file
=
args
.
hotwords_file
,
hotwords_score
=
args
.
hotwords_score
,
provider
=
args
.
provider
,
)
elif
args
.
paraformer
:
assert
len
(
args
.
nemo_ctc
)
==
0
,
args
.
nemo_ctc
...
...
@@ -879,6 +880,7 @@ def create_recognizer(args) -> sherpa_onnx.OfflineRecognizer:
sample_rate
=
args
.
sample_rate
,
feature_dim
=
args
.
feat_dim
,
decoding_method
=
args
.
decoding_method
,
provider
=
args
.
provider
,
)
elif
args
.
nemo_ctc
:
assert
len
(
args
.
wenet_ctc
)
==
0
,
args
.
wenet_ctc
...
...
@@ -895,6 +897,7 @@ def create_recognizer(args) -> sherpa_onnx.OfflineRecognizer:
sample_rate
=
args
.
sample_rate
,
feature_dim
=
args
.
feat_dim
,
decoding_method
=
args
.
decoding_method
,
provider
=
args
.
provider
,
)
elif
args
.
wenet_ctc
:
assert
len
(
args
.
whisper_encoder
)
==
0
,
args
.
whisper_encoder
...
...
@@ -910,6 +913,7 @@ def create_recognizer(args) -> sherpa_onnx.OfflineRecognizer:
sample_rate
=
args
.
sample_rate
,
feature_dim
=
args
.
feat_dim
,
decoding_method
=
args
.
decoding_method
,
provider
=
args
.
provider
,
)
elif
args
.
whisper_encoder
:
assert
len
(
args
.
tdnn_model
)
==
0
,
args
.
tdnn_model
...
...
@@ -925,6 +929,7 @@ def create_recognizer(args) -> sherpa_onnx.OfflineRecognizer:
language
=
args
.
whisper_language
,
task
=
args
.
whisper_task
,
tail_paddings
=
args
.
whisper_tail_paddings
,
provider
=
args
.
provider
,
)
elif
args
.
tdnn_model
:
assert_file_exists
(
args
.
tdnn_model
)
...
...
@@ -936,6 +941,7 @@ def create_recognizer(args) -> sherpa_onnx.OfflineRecognizer:
feature_dim
=
args
.
feat_dim
,
num_threads
=
args
.
num_threads
,
decoding_method
=
args
.
decoding_method
,
provider
=
args
.
provider
,
)
else
:
raise
ValueError
(
"Please specify at least one model"
)
...
...
请
注册
或
登录
后发表评论