Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
funasr_2607
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 45c0b11d
authored
Jul 27, 2026
by
王欣伟
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
推理cpu数量增加到6个,分片时长可配置60s
1 parent
cf245785
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
asr_service/models.py
config.yaml
asr_service/models.py
View file @
45c0b11
...
@@ -78,6 +78,11 @@ class ASRModel:
...
@@ -78,6 +78,11 @@ class ASRModel:
disable_update
=
cfg
.
get
(
"disable_update"
,
True
),
disable_update
=
cfg
.
get
(
"disable_update"
,
True
),
ncpu
=
int
(
ncpu
),
ncpu
=
int
(
ncpu
),
)
)
# VAD 参数(max_single_segment_time 单段最大时长,对齐旧版 60000ms)
if
cfg
.
get
(
"vad_kwargs"
):
kwargs
[
"vad_kwargs"
]
=
cfg
[
"vad_kwargs"
]
# 去掉值为 None 的可选模型
# 去掉值为 None 的可选模型
kwargs
=
{
k
:
v
for
k
,
v
in
kwargs
.
items
()
if
v
is
not
None
}
kwargs
=
{
k
:
v
for
k
,
v
in
kwargs
.
items
()
if
v
is
not
None
}
...
...
config.yaml
View file @
45c0b11
...
@@ -23,7 +23,7 @@ model:
...
@@ -23,7 +23,7 @@ model:
device
:
"
cpu"
# 推理设备:cpu / cuda:0
device
:
"
cpu"
# 推理设备:cpu / cuda:0
disable_update
:
true
# 禁止运行时检查模型更新
disable_update
:
true
# 禁止运行时检查模型更新
local_files_only
:
false
# 首次下载完成后设 true,强制只读本地缓存,避免每次启动联网检查模型
local_files_only
:
false
# 首次下载完成后设 true,强制只读本地缓存,避免每次启动联网检查模型
ncpu
:
2
# CPU 推理线程数(torch.set_num_threads),建议 1-4
ncpu
:
6
# CPU 推理线程数(torch.set_num_threads),建议 1-4
hotword
:
"
"
# 可选热词,空格分隔,如 "阿里 达摩院";空字符串表示不启用
hotword
:
"
"
# 可选热词,空格分隔,如 "阿里 达摩院";空字符串表示不启用
# 模型本地存储目录(设置 MODELSCOPE_CACHE 环境变量)
# 模型本地存储目录(设置 MODELSCOPE_CACHE 环境变量)
# Windows 默认: E:/models/funasr_models
# Windows 默认: E:/models/funasr_models
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment