Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Recognize Speech Invalid WAV header in file, data block was not found #962

Closed
twizzyyanki opened this issue Feb 16, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@twizzyyanki
Copy link

I have a wav file and I am trying to use it to text azure speech to text using this url - https://azure.microsoft.com/en-us/services/cognitive-services/speech-to-text/#features. I am getting Cannot Recognize Speech Invalid WAV header in file, data block was not found error. I am not sure what is wrong and why I am getting this error. The wav file looks totally fine to me. This is the file I am using to test - http://talonsoftwares.com/upload/2422332.wav

@pankopon pankopon added the bug Something isn't working label Feb 17, 2021
@pankopon
Copy link
Contributor

Hi, thanks for reporting the issue - the problem occurs because of a WAV header size limit in the JavaScript SDK. There is now a pull request to raise this limit: microsoft/cognitive-services-speech-sdk-js#328

For comparison, https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/sampledata/audiofiles/aboutSpeechSdk.wav where the header has no metadata:

image

and your 2422332.wav which contains an INFO chunk in the header which happens to go over the limit:

image

@BriceChivu
Copy link

Hello,
I faced the same issue and I solved it simply by converting my audio sample rate from 48kHz to 16kHz.
It worked well after that.

@Stefuu
Copy link

Stefuu commented Jul 16, 2024

solved it by converting to 16kHz too, weird that it doesn't work out of the box, but it's MS right haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants