Skip to content

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

python runtime

游雁7293a7bbe783
diff --git a/runtime/python/libtorch/funasr_torch/sensevoice_bin.py b/runtime/python/libtorch/funasr_torch/sensevoice_bin.py
index 2f66f4e6f..11cd2c98c 100644
--- a/runtime/python/libtorch/funasr_torch/sensevoice_bin.py
+++ b/runtime/python/libtorch/funasr_torch/sensevoice_bin.py
@@ -111,10 +111,8 @@ class SenseVoiceSmall:
mask = yseq != self.blank_id
token_int = yseq[mask].tolist()
- if tokenizer is not None:
- asr_res.append(self.tokenizer.decode(token_int))
- else:
- asr_res.append(token_int)
+ asr_res.append(self.tokenizer.decode(token_int))
+
return asr_res
def load_data(self, wav_content: Union[str, np.ndarray, List[str]], fs: int = None) -> List: