Skip to content

Bad Request: failed to process audio: corrupt or unsupported data #181

Closed Answered by jjmaldonis
midou221 asked this question in General help
Discussion options

You must be logged in to vote

Hey @midou221! A Bad request error message is often due to some part of the request being formatted incorrectly.

One thing you can change right away is using audio/mpeg rather than audio/mp3 because technically audio/mp3 isn't a mime type.

Also, when an audio file is loaded into a byte array and passed to the Deepgram API, the key:value pair that goes in the data part of the request is: {"source": <your audio byte array>}. So if you change "file" to "source" that will help. You'll also want to include the mime type in the data part of the request, so the full data part will look like this:

{"source": <your audio byte array>, "mimetype": "audio/mpeg"}

It's also possible that the Bad request

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by midou221
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants