From 621ee6a50bb8cd683d2689beadc6cc123eeefb7b Mon Sep 17 00:00:00 2001
From: lingyunfly <121302812+lingyunfly@users.noreply.github.com>
Date: 星期日, 23 四月 2023 22:41:34 +0800
Subject: [PATCH] Update test_vad_inference_pipeline.py

---
 funasr/bin/sond_inference.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/funasr/bin/sond_inference.py b/funasr/bin/sond_inference.py
index 5a0a8e2..c55bc35 100755
--- a/funasr/bin/sond_inference.py
+++ b/funasr/bin/sond_inference.py
@@ -252,6 +252,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 ngpu > 1:

--
Gitblit v1.9.1