wit-ai / wit

Natural Language Interface for apps and devices
https://wit.ai/
931 stars 91 forks source link

Dictation always returns error for audio bigger than 121 seconds #2671

Closed paulofloresjunior closed 9 months ago

paulofloresjunior commented 10 months ago

Hi,

I'm using wit.ai for transcript audio mostly in portuguese language (PT), for now I'm using speech, but I want to move to dictaction because it supports longer audio duration. In documentation says it should support 5 minutes audio length, but every audio longer than 121 seconds returns some texts and in the end the follow message: { "code": "wit", "error": "An error occurred in speech recognition." }

I already tried to change audio compression, change audio to mono, also tried audio in english language with application to english and I got same result every time.

I'm testing using POSTMAN, something like this: curl --location 'https://api.wit.ai/dictation' \ --header 'Content-Type: audio/ogg' \ --header 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXX' \ --data '@/C:/Users/paulo/Documents/audio_eng.ogg'

Thanks for any help here.

MokhtarKhorshid commented 10 months ago

Can you please share a sample file where you were facing this issue? Also, can you test using a 16k 16bit single wav audio format?

paulofloresjunior commented 9 months ago

Hi,

Thanks for reply, I also tried in 16k 16bit single wav and got same error, could you try with these files: All files with 120 seconds works fine, all files with 300 seconds returns error: Portuguese language audio samples: drywall_PT_120_seconds ogg drywall_PT_120_seconds wav drywall_PT_300_seconds ogg drywall_PT_300_seconds wav

English language audio samples: steve_jobs_2005_120seconds steve_jobs_2005_300seconds

MokhtarKhorshid commented 9 months ago

Thank you. This appears to be a bug and we are investigating.

paulofloresjunior commented 9 months ago

Good to know you could reproduce.

nomiero commented 9 months ago

This should be fixed now and you can use audio up to 5 minutes. We do recommend using one of the our SDKs instead of REST for your app because they take care of things like chunking and they make sure to provide the best perf with using our APis. I will close the issue, please let us know if you still run into this.

paulofloresjunior commented 9 months ago

Thank you for solve the problem! There is any official or recommended SDK for C#?