Skip to content

Getting a 400 when trying to transcribe a pre-recorded wav audio file #205

Closed Answered by nikolawhallon
alikaragoz asked this question in General help
Discussion options

You must be logged in to vote

Can you try:

curl -X POST \
     "https://api.deepgram.com/v1/listen" \
     -H "Authorization: Token MY_API_KEY" \
     --data-binary @samples_jfk.wav

What you have, sending JSON, is the right method when asking Deepgram to grab a file from a URL to transcribe, e.g.:

curl \
  -X POST \
  "https://api.deepgram.com/v1/listen" \
  -H "Authorization: Token MY_API_KEY" \
  -H "content-type: application/json" \
  -d '{"url":"https://static.deepgram.com/examples/Bueller-Life-moves-pretty-fast.wav"}'

but for directly uploading the audio in the request body, it can/should be sent as binary and not JSON.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@alikaragoz
Comment options

@nikolawhallon
Comment options

Answer selected by lukeocodes
Comment options

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