wit icon indicating copy to clipboard operation
wit copied to clipboard

Wit Speech API return empty text

Open siyanew opened this issue 5 years ago • 20 comments

Do you want to request a feature, report a bug, or ask a question about wit?

report a bug

What is the current behavior?

speech api always returns empty text

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

In every situations it returns empty text

What is the expected behavior?

return speech was spoken in wav or ogg files

If applicable, what is the App ID where you are experiencing this issue? If you do not provide this, we cannot help.

485244245601693 and 1172799353138600

siyanew avatar Jul 31 '21 13:07 siyanew

This happens to me as well! Previously it was working fine. But now the response is empty!

appId 585410835512762 language is set to Russian

n0th1ng-else avatar Aug 01 '21 13:08 n0th1ng-else

Also, this happens to me! Everything worked fine until July 28. Almost all responses are empty. Sometimes the response is not empty, but really not correct. I have 10 standard audio files (for test), and when I made a test requests all the responses were correct. But now all the responses to my test requests are empty or incorrect.

appId 2654426877976507 language is also set to Russian

DegtiarDmitro avatar Aug 01 '21 14:08 DegtiarDmitro

Hi, thanks for reporting. I'm looking into this.

patapizza avatar Aug 02 '21 15:08 patapizza

Same here!, most of the time responses are empty and when return something is not correct. AppId: 2727554580829122. The Application is set to Spanish.

mancu37 avatar Aug 02 '21 17:08 mancu37

Can you all confirm the encoding of your files using file? https://wit.ai/docs/http/#post__speech_link Also can you confirm you're getting a 200 HTTP status back?

patapizza avatar Aug 02 '21 19:08 patapizza

Hi, I've been using this library since 2019 and I've never had an issue since a few days ago. I'm using wav file. I'll paste a screenshot below. this what I have:

image

And this is the code that I'm using

image

Also, after this issue, I've tried HTTP API Request but it does not work. I get empty response.

image

Let me know if you need more details.

Thanks, Martin

mancu37 avatar Aug 02 '21 19:08 mancu37

one of the sample files file output.wav output.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 48000 Hz

n0th1ng-else avatar Aug 02 '21 20:08 n0th1ng-else

same for @mancu37 I have been using wit.ai for a while and did not change anything. it just stopped working the other day. (the response is the same)

n0th1ng-else avatar Aug 02 '21 20:08 n0th1ng-else

I got responses just like @mancu37 , 200 with empty _text.

siyanew avatar Aug 02 '21 20:08 siyanew

Got it, thanks. I've recently updated the HTTP doc; a 16k sample rate would fix the issue, and also speed up the processing. It's something you might want to look into. I'm working on deploying a fix.

patapizza avatar Aug 02 '21 20:08 patapizza

Thank you! It work

DegtiarDmitro avatar Aug 02 '21 21:08 DegtiarDmitro

My problems have been solved by converting the wav file to 16k bitrate. I appreciate your help. @patapizza

siyanew avatar Aug 03 '21 10:08 siyanew

It worked for me too! with16k sample rate. Thanks @patapizza !

mancu37 avatar Aug 03 '21 11:08 mancu37

It's not just the sample rate, I tried with ogg at 8Khz and it works, it seems to be failing only on wav files.

mariolenis avatar Aug 03 '21 13:08 mariolenis

@mariolenis The issue is for some wav and flac encodings, where we need to convert back to 16khz. Other encodings like ogg aways get converted, so there's no issue, but the latency would be higher due to the conversion.

patapizza avatar Aug 03 '21 15:08 patapizza

It also happens to me when I send opus files { "entities": {}, "intents": [], "text": "", "traits": {} }

FelipeBonadykov avatar Aug 05 '21 18:08 FelipeBonadykov

Hi @patapizza ! I am wondering whether wit.ai supports WhatsApp audios in voice recognition, if currently empty string response is a bug and if I can somehow temporally resolve this issue in the later case. Waiting forward to your reply

FelipeBonadykov avatar Aug 06 '21 13:08 FelipeBonadykov

Hi @FelipeBonadykov, here's the list of the currently supported encodings: HTTP docs. Opus isn't currently supported, audio/ogg is. If you share the output of the file format of an .ogg file, I'll be able to confirm the support.

patapizza avatar Aug 06 '21 16:08 patapizza

Hi @patapizza ! This is the output of whatsapp ogg file (downloaded from whatsapp web) { "entities": {}, "intents": [], "text": "", "traits": {} }

same is the output when I try with opus files that have type as "audio/ogg; codecs=opus" (is it considered as audio/ogg type?)

FelipeBonadykov avatar Aug 06 '21 16:08 FelipeBonadykov

I'm experiencing empty text responses when sending ogg files, but correct responses if I convert the same files to mp3 or wav beforehand.

Logerfo avatar Dec 13 '22 16:12 Logerfo