Yabin Li
2023-05-05 63cb171bc5f734180195e2428ef4b3a0da93dc43
Update audio.cpp
1个文件已修改
9 ■■■■■ 已修改文件
funasr/runtime/onnxruntime/src/audio.cpp 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/runtime/onnxruntime/src/audio.cpp
@@ -238,6 +238,15 @@
        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