Bad Request: failed to process audio: corrupt or unsupported data #181
-
honestly I can't figure out the bug.. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @midou221! A One thing you can change right away is using 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
It's also possible that the |
Beta Was this translation helpful? Give feedback.
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 thanaudio/mp3
because technicallyaudio/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 thedata
part of the request, so the fulldata
part will look like this:It's also possible that the
Bad request
…