examples : use miniaudio for direct decoding flac, mp3, ogg and wav (#2759)

This commit is contained in:
Dmitry Atamanov
2025-02-27 12:06:54 +05:00
committed by GitHub
parent b5d21359c1
commit 7d3da68f79
10 changed files with 99150 additions and 8930 deletions

View File

@ -171,8 +171,8 @@ int run(whisper_params &params, std::vector<std::vector<std::string>> &result) {
// read the input audio file if params.pcmf32 is not provided
if (params.pcmf32.empty()) {
if (!::read_wav(fname_inp, pcmf32, pcmf32s, params.diarize)) {
fprintf(stderr, "error: failed to read WAV file '%s'\n", fname_inp.c_str());
if (!::read_audio_data(fname_inp, pcmf32, pcmf32s, params.diarize)) {
fprintf(stderr, "error: failed to read audio file '%s'\n", fname_inp.c_str());
continue;
}
} else {