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 requesterror message is often due to some part of the request being formatted incorrectly.One thing you can change right away is using
audio/mpegrather thanaudio/mp3because technicallyaudio/mp3isn'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
datapart 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 thedatapart of the request, so the fulldatapart will look like this:It's also possible that the
Bad request…