From 7293a7bbe783878fcb548a55520795118041ba2d Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期一, 22 七月 2024 20:06:04 +0800
Subject: [PATCH] python runtime
---
runtime/python/libtorch/funasr_torch/sensevoice_bin.py | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/runtime/python/libtorch/funasr_torch/sensevoice_bin.py b/runtime/python/libtorch/funasr_torch/sensevoice_bin.py
index 2f66f4e..11cd2c9 100644
--- a/runtime/python/libtorch/funasr_torch/sensevoice_bin.py
+++ b/runtime/python/libtorch/funasr_torch/sensevoice_bin.py
@@ -111,10 +111,8 @@
mask = yseq != self.blank_id
token_int = yseq[mask].tolist()
- if tokenizer is not None:
- asr_res.append(self.tokenizer.decode(token_int))
- else:
- asr_res.append(token_int)
+ asr_res.append(self.tokenizer.decode(token_int))
+
return asr_res
def load_data(self, wav_content: Union[str, np.ndarray, List[str]], fs: int = None) -> List:
--
Gitblit v1.9.1