Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.
Python asraudiochineseemotion-recognitionfunasrmcp-servermultilingual-asropenai-compatible-apiparaformerpunctuationpytorchreal-time-asrspeaker-diarizationspeech-recognitionspeech-to-textstreaming-asrtranscriptionvllmvoice-activity-detectionwhisper-alternative
Fix: Return tuple ('', []) when char_list is empty to prevent ValueError (#1857)
lingji-yidongc880db53646a
diff --git a/runtime/python/onnxruntime/funasr_onnx/utils/timestamp_utils.py b/runtime/python/onnxruntime/funasr_onnx/utils/timestamp_utils.pyindex c8ba5a7e0..945bcace3 100644--- a/runtime/python/onnxruntime/funasr_onnx/utils/timestamp_utils.py+++ b/runtime/python/onnxruntime/funasr_onnx/utils/timestamp_utils.py@@ -7,7 +7,7 @@ import numpy as npdef time_stamp_lfr6_onnx(us_cif_peak, char_list, begin_time=0.0, total_offset=-1.5):if not len(char_list):- return []+ return "", []START_END_THRESHOLD = 5MAX_TOKEN_DURATION = 30TIME_RATE = 10.0 * 6 / 1000 / 3 # 3 times upsampled