Skip to content

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

Merge branch 'main' into dev_apis

Yabin Li8a08405b668e
diff --cc funasr/runtime/onnxruntime/src/audio.cpp
index 6113614ed,e6bfd2848..2ecd3e63c
--- a/funasr/runtime/onnxruntime/src/audio.cpp
+++ b/funasr/runtime/onnxruntime/src/audio.cpp
@@@ -237,16 -237,16 +237,25 @@@ bool Audio::LoadWav(const char *filenam
LOG(ERROR) << "Failed to read " << filename;
return false;
}
+
+ if (!header.Validate()) {
+ return false;
+ }
+
+ header.SeekToDataChunk(is);
+ if (!is) {
+ return false;
+ }
+ if (!header.Validate()) {
+ return false;
+ }
+
+ header.SeekToDataChunk(is);
+ if (!is) {
+ return false;
+ }
+
*sampling_rate = header.sample_rate;
// header.subchunk2_size contains the number of bytes in the data.
// As we assume each sample contains two bytes, so it is divided by 2 here