From ea8e5bb726d106131834de8aded0be49db25898d Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期一, 22 七月 2024 20:00:02 +0800
Subject: [PATCH] python runtime

---
 runtime/python/libtorch/funasr_torch/sensevoice_bin.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/runtime/python/libtorch/funasr_torch/sensevoice_bin.py b/runtime/python/libtorch/funasr_torch/sensevoice_bin.py
index 6808a5f..19ed37d 100644
--- a/runtime/python/libtorch/funasr_torch/sensevoice_bin.py
+++ b/runtime/python/libtorch/funasr_torch/sensevoice_bin.py
@@ -78,6 +78,10 @@
         self.ort_infer = torch.jit.load(model_file)
         self.batch_size = batch_size
         self.blank_id = 0
+        self.lid_dict = {"auto": 0, "zh": 3, "en": 4, "yue": 7, "ja": 11, "ko": 12, "nospeech": 13}
+        self.lid_int_dict = {24884: 3, 24885: 4, 24888: 7, 24892: 11, 24896: 12, 24992: 13}
+        self.textnorm_dict = {"withitn": 14, "woitn": 15}
+        self.textnorm_int_dict = {25016: 14, 25017: 15}
 
     def __call__(self, wav_content: Union[str, np.ndarray, List[str]], **kwargs) -> List:
 

--
Gitblit v1.9.1