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
export model
游雁b6b8b9cf8e3a
diff --git a/funasr/runtime/python/onnxruntime/paraformer/rapid_paraformer/paraformer_onnx.py b/funasr/runtime/python/onnxruntime/paraformer/rapid_paraformer/paraformer_onnx.pyindex b6ff0cdfe..e52000826 100644--- a/funasr/runtime/python/onnxruntime/paraformer/rapid_paraformer/paraformer_onnx.py+++ b/funasr/runtime/python/onnxruntime/paraformer/rapid_paraformer/paraformer_onnx.py@@ -9,11 +9,11 @@ from typing import List, Union, Tupleimport librosaimport numpy as np-from .utils.utils import (CharTokenizer, Hypothesis, ONNXRuntimeError,+from utils.utils import (CharTokenizer, Hypothesis, ONNXRuntimeError,OrtInferSession, TokenIDConverter, get_logger,read_yaml)-from .utils.postprocess_utils import sentence_postprocess-from .utils.frontend import WavFrontend+from utils.postprocess_utils import sentence_postprocess+from utils.frontend import WavFrontendlogging = get_logger()diff --git a/funasr/runtime/python/onnxruntime/paraformer/rapid_paraformer/utils/frontend.py b/funasr/runtime/python/onnxruntime/paraformer/rapid_paraformer/utils/frontend.pyindex f973f6551..9f0c5354f 100644--- a/funasr/runtime/python/onnxruntime/paraformer/rapid_paraformer/utils/frontend.py+++ b/funasr/runtime/python/onnxruntime/paraformer/rapid_paraformer/utils/frontend.py@@ -43,8 +43,6 @@ class WavFrontend():opts.mel_opts.debug_mel = Falseself.opts = opts- self.compute_fbank_feats = knf.OnlineFbank(self.opts)-self.filter_length_min = filter_length_minself.filter_length_max = filter_length_maxself.lfr_m = lfr_m@@ -57,11 +55,12 @@ class WavFrontend():def fbank(self,waveform: np.ndarray) -> Tuple[np.ndarray, np.ndarray]:waveform = waveform * (1 << 15)- self.compute_fbank_feats.accept_waveform(self.opts.frame_opts.samp_freq, waveform.tolist())- frames = self.compute_fbank_feats.num_frames_ready+ fbank_fn = knf.OnlineFbank(self.opts)+ fbank_fn.accept_waveform(self.opts.frame_opts.samp_freq, waveform.tolist())+ frames = fbank_fn.num_frames_readymat = np.empty([frames, self.opts.mel_opts.num_bins])for i in range(frames):- mat[i, :] = self.compute_fbank_feats.get_frame(i)+ mat[i, :] = fbank_fn.get_frame(i)feat = mat.astype(np.float32)feat_len = np.array(mat.shape[0]).astype(np.int32)return feat, feat_lendiff --git a/kaldi-native-fbank b/kaldi-native-fbanknew file mode 120000index 000000000..8b45d841f--- /dev/null+++ b/kaldi-native-fbank@@ -0,0 +1 @@+../kaldi-native-fbank\ No newline at end of file