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
auto frontend
游雁ddd4ad419bd1
diff --git a/funasr/auto/auto_frontend.py b/funasr/auto/auto_frontend.pyindex 3d6db8d8c..696a51e08 100644--- a/funasr/auto/auto_frontend.py+++ b/funasr/auto/auto_frontend.py@@ -87,8 +87,16 @@ class AutoFrontend:speech_lengths.sum().item() * self.frontend.frame_shift * self.frontend.lfr_n / 1000)- speech.to(device=device), speech_lengths.to(device=device)- batch = {"input": speech, "input_len": speech_lengths, "key": key_batch}+ if kwargs.get("return_pt", True):+ speech, speech_lengths = speech.to(device=device), speech_lengths.to(device=device)+ else:+ speech, speech_lengths = speech.numpy(), speech_lengths.numpy()+ batch = {+ "input": speech,+ "input_len": speech_lengths,+ "key": key_batch,+ data_type: "fbank",+ }result_list.append(batch)pbar.update(1)