Commit 45c0b11d by 王欣伟

推理cpu数量增加到6个,分片时长可配置60s

1 parent cf245785
...@@ -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}
......
...@@ -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
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!