From 1358e8a5fcba9d9da4ed1478a91f217e8c211fc0 Mon Sep 17 00:00:00 2001
From: Yabin Li <wucong.lyb@alibaba-inc.com>
Date: 星期一, 08 五月 2023 19:49:51 +0800
Subject: [PATCH] Merge pull request #476 from alibaba-damo-academy/dev_grpc
---
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