维石
2024-07-26 874ed3aaac591e2d1c29087b5f4e86ba66272f8b
bug fix for onnx infer
2个文件已修改
6 ■■■■■ 已修改文件
runtime/python/libtorch/funasr_torch/sensevoice_bin.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
runtime/python/onnxruntime/funasr_onnx/sensevoice_bin.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
runtime/python/libtorch/funasr_torch/sensevoice_bin.py
@@ -158,6 +158,9 @@
            feats, feats_len = self.extract_feat(waveform_list[beg_idx:end_idx])
            _language_list = language_list[beg_idx:end_idx]
            _textnorm_list = textnorm_list[beg_idx:end_idx]
            if not len(_language_list):
                _language_list = [language_list[0]]
                _textnorm_list = [textnorm_list[0]]
            B = feats.shape[0]
            if len(_language_list) == 1 and B != 1:
                _language_list = _language_list * B
runtime/python/onnxruntime/funasr_onnx/sensevoice_bin.py
@@ -165,6 +165,9 @@
            feats, feats_len = self.extract_feat(waveform_list[beg_idx:end_idx])
            _language_list = language_list[beg_idx:end_idx]
            _textnorm_list = textnorm_list[beg_idx:end_idx]
            if not len(_language_list):
                _language_list = [language_list[0]]
                _textnorm_list = [textnorm_list[0]]
            B = feats.shape[0]
            if len(_language_list) == 1 and B != 1:
                _language_list = _language_list * B