ChetanXpro / nodejs-whisper

NodeJS Bindings for Whisper - the CPU version of OpenAI's Whisper, as initially crafted in C++ by ggerganov.
https://npmjs.com/nodejs-whisper
MIT License
93 stars 22 forks source link

fix: handling of mislabeled WAV files with non-WAV content #79

Closed ChetanXpro closed 6 months ago

ChetanXpro commented 6 months ago

This commit addresses an issue where files with a .wav extension but containing non-WAV data (such as FLAC) caused errors due to incorrect format assumptions. The updated logic now verifies the WAV header before processing and conditionally overwrites or converts the file based on its actual content and header validity.