From fe8ebd746bf0c0f57ef85ed342500cbf0e2c4e9e Mon Sep 17 00:00:00 2001
From: 维石 <shixian.shi@alibaba-inc.com>
Date: 星期二, 23 七月 2024 16:59:57 +0800
Subject: [PATCH] update gitignore
---
runtime/python/onnxruntime/funasr_onnx/sensevoice_bin.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/runtime/python/onnxruntime/funasr_onnx/sensevoice_bin.py b/runtime/python/onnxruntime/funasr_onnx/sensevoice_bin.py
index 7d6f341..433acd1 100644
--- a/runtime/python/onnxruntime/funasr_onnx/sensevoice_bin.py
+++ b/runtime/python/onnxruntime/funasr_onnx/sensevoice_bin.py
@@ -107,8 +107,8 @@
ctc_logits, encoder_out_lens = self.infer(
feats,
feats_len,
- np.array(language, dtype=np.int32),
- np.array(textnorm, dtype=np.int32),
+ np.array([language], dtype=np.int32),
+ np.array([textnorm], dtype=np.int32),
)
# back to torch.Tensor
ctc_logits = torch.from_numpy(ctc_logits).float()
@@ -120,7 +120,7 @@
mask = yseq != self.blank_id
token_int = yseq[mask].tolist()
- asr_res.append(self.tokenizer.encode(token_int))
+ asr_res.append(self.tokenizer.decode(token_int))
return asr_res
--
Gitblit v1.9.1