From 86e72b594ac6e00345b2f52fd0e44e32fa68ee9c Mon Sep 17 00:00:00 2001
From: chong.zhang <chong.zhang@alibaba-inc.com>
Date: 星期五, 05 五月 2023 14:46:29 +0800
Subject: [PATCH] docs/modelscope_models.md
---
funasr/bin/asr_inference.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/funasr/bin/asr_inference.py b/funasr/bin/asr_inference.py
index f3b4d56..4722602 100644
--- a/funasr/bin/asr_inference.py
+++ b/funasr/bin/asr_inference.py
@@ -346,6 +346,8 @@
**kwargs,
):
assert check_argument_types()
+ ncpu = kwargs.get("ncpu", 1)
+ torch.set_num_threads(ncpu)
if batch_size > 1:
raise NotImplementedError("batch decoding is not implemented")
if word_lm_train_config is not None:
--
Gitblit v1.9.1