wit-ai / wit

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

POST speech "error" : "Something went wrong. We've been notified.", #797

Closed basickarl closed 6 years ago

basickarl commented 6 years ago

I am aware of the node api module, however I'd like to use the request library to achieve this. I'm using the https://github.com/gillesdemey/node-record-lpcm16 to stream a wav to the request. As follows:

    record.start({
            recordProgram: 'sox',
        }).pipe(request.post({
                'url': 'https://api.wit.ai/speech?v=20170307',
                'headers': {
                    'Authorization': `Bearer ${witToken}`,
                    'Content-Type': 'audio/wav',
                }
            }, (error, response, body) => {
                if (error) {
                    throw error;
                }
                console.log(body);
            }));

I get the body:

{
  "error" : "Something went wrong. We've been notified.",
  "code" : "wit"
}

I've read the documentation: https://wit.ai/docs/http/20170307#post--speech-link

What am I missing?

l5t commented 6 years ago

It can happen for a lot of reasons (are you streaming a real wav). I suggest you look at these examples:

blandinw commented 6 years ago

I'm closing as this is not very actionable. Something went wrong is not a good enough error message. If you still encounter the issue, please comment here with the precise timestamps (and your timezone) so that we can look deeper and either fix it, or make the error messages more useful.

488kuroi commented 6 years ago

I have a similar issue, since few day, speech api is not working correctly anymore. Giving a "400: Bad request", where earlier all was working correctly.