speech_asr 2 years ago
parent
commit
66fc9f0a9b

+ 3 - 0
funasr/bin/asr_inference_launch.py

@@ -2,6 +2,9 @@
 # Copyright ESPnet (https://github.com/espnet/espnet). All Rights Reserved.
 #  Apache 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
 
+import torch
+torch.set_num_threads(1)
+
 import argparse
 import logging
 import os

+ 3 - 0
funasr/bin/diar_inference_launch.py

@@ -2,6 +2,9 @@
 # Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights Reserved.
 #  MIT License  (https://opensource.org/licenses/MIT)
 
+import torch
+torch.set_num_threads(1)
+
 import argparse
 import logging
 import os

+ 3 - 0
funasr/bin/lm_inference_launch.py

@@ -2,6 +2,9 @@
 # Copyright ESPnet (https://github.com/espnet/espnet). All Rights Reserved.
 #  Apache 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
 
+import torch
+torch.set_num_threads(1)
+
 import argparse
 import logging
 import os

+ 3 - 0
funasr/bin/punc_inference_launch.py

@@ -2,6 +2,9 @@
 # Copyright ESPnet (https://github.com/espnet/espnet). All Rights Reserved.
 #  Apache 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
 
+import torch
+torch.set_num_threads(1)
+
 import argparse
 import logging
 import os

+ 3 - 0
funasr/bin/sv_inference_launch.py

@@ -2,6 +2,9 @@
 # Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights Reserved.
 #  MIT License  (https://opensource.org/licenses/MIT)
 
+import torch
+torch.set_num_threads(1)
+
 import argparse
 import logging
 import os

+ 3 - 0
funasr/bin/tp_inference_launch.py

@@ -2,6 +2,9 @@
 # Copyright ESPnet (https://github.com/espnet/espnet). All Rights Reserved.
 #  Apache 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
 
+import torch
+torch.set_num_threads(1)
+
 import argparse
 import logging
 import os

+ 3 - 0
funasr/bin/vad_inference_launch.py

@@ -2,6 +2,9 @@
 # Copyright ESPnet (https://github.com/espnet/espnet). All Rights Reserved.
 #  Apache 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
 
+import torch
+torch.set_num_threads(1)
+
 import argparse
 import logging
 import os