-1

I'm getting a 500 error when converting a simple MP3 file from speech to text using the Wit.ai site.

I'm thinking the WAV I'm sending is not in the right format. Here's my conversion:

ffmpeg -i input.mp3 -acodec pcm_s16le -ac 1 -ar 16000 input.wav

This gives me a WAV file with pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s

Here's my request:

curl -X "POST" "https://api.wit.ai/speech?v=20160526" \
     -H "Authorization: Bearer TOKEN_HERE" \
     -H "Content-Type: audio/wav"

I'm sending the file as binary content in the request. I also tried MP3 but it does not work either. Any idea why?

VC.One
  • 14,790
  • 4
  • 25
  • 57
Vallieres
  • 859
  • 7
  • 19
  • It tells you on the site that error 500 is a problem with their side. Check with them (forums/email) what the problem is. Possibly a server issue or such... – VC.One Jan 31 '17 at 11:16

1 Answers1

0

Ended up that audio files with more than 10s cannot be processed. They should implement a specific 400 Bad Request for that and perhaps a response with this very thing in it.

Vallieres
  • 859
  • 7
  • 19