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: resolve IndexError when using spk model and the audio contains only 1 segment (#1535)
Atomie CHENff83116369ba
diff --git a/funasr/models/campplus/utils.py b/funasr/models/campplus/utils.pyindex 935c674f9..399be4b0a 100644--- a/funasr/models/campplus/utils.py+++ b/funasr/models/campplus/utils.py@@ -177,6 +177,9 @@ def merge_seque(distribute_res):return resdef smooth(res, mindur=1):+ # if only one segment, return directly+ if len(res) < 2:+ return res# short segments are assigned to nearest speakers.for i in range(len(res)):res[i][0] = round(res[i][0], 2)