python runtime

This commit is contained in:
游雁 2024-07-22 20:00:02 +08:00
parent c5f7f11b5b
commit ea8e5bb726

View File

@ -78,6 +78,10 @@ class SenseVoiceSmall:
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: