From c441eb08c44dfd4a7a8c68970fd3ebe7943d06ee Mon Sep 17 00:00:00 2001
From: shixian.shi <shixian.shi@alibaba-inc.com>
Date: 星期四, 09 三月 2023 15:26:03 +0800
Subject: [PATCH] tp_inference device bug
---
funasr/bin/tp_inference.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/funasr/bin/tp_inference.py b/funasr/bin/tp_inference.py
index 7f9890f..67e82a7 100644
--- a/funasr/bin/tp_inference.py
+++ b/funasr/bin/tp_inference.py
@@ -112,6 +112,9 @@
tp_model, tp_train_args = ASRTask.build_model_from_file(
timestamp_infer_config, timestamp_model_file, device
)
+ if 'cuda' in device:
+ tp_model = tp_model.cuda()
+
frontend = None
if tp_train_args.frontend is not None:
frontend = WavFrontend(cmvn_file=timestamp_cmvn_file, **tp_train_args.frontend_conf)
@@ -240,7 +243,6 @@
device = "cuda"
else:
device = "cpu"
-
# 1. Set random-seed
set_all_random_seed(seed)
--
Gitblit v1.9.1