mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
bug fix for onnx infer
This commit is contained in:
parent
af1c0d0e30
commit
874ed3aaac
@ -158,6 +158,9 @@ class SenseVoiceSmall:
|
|||||||
feats, feats_len = self.extract_feat(waveform_list[beg_idx:end_idx])
|
feats, feats_len = self.extract_feat(waveform_list[beg_idx:end_idx])
|
||||||
_language_list = language_list[beg_idx:end_idx]
|
_language_list = language_list[beg_idx:end_idx]
|
||||||
_textnorm_list = textnorm_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]
|
B = feats.shape[0]
|
||||||
if len(_language_list) == 1 and B != 1:
|
if len(_language_list) == 1 and B != 1:
|
||||||
_language_list = _language_list * B
|
_language_list = _language_list * B
|
||||||
|
|||||||
@ -165,6 +165,9 @@ class SenseVoiceSmall:
|
|||||||
feats, feats_len = self.extract_feat(waveform_list[beg_idx:end_idx])
|
feats, feats_len = self.extract_feat(waveform_list[beg_idx:end_idx])
|
||||||
_language_list = language_list[beg_idx:end_idx]
|
_language_list = language_list[beg_idx:end_idx]
|
||||||
_textnorm_list = textnorm_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]
|
B = feats.shape[0]
|
||||||
if len(_language_list) == 1 and B != 1:
|
if len(_language_list) == 1 and B != 1:
|
||||||
_language_list = _language_list * B
|
_language_list = _language_list * B
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user