Skip to main content

Transcription

POST /v1/audio/transcriptions turns a short audio clip into text — for example a voice note the user recorded, to send as a message.

curl -s "$NEWEYES_API_BASE/v1/audio/transcriptions" -X POST \
-H "Authorization: Bearer $NEWEYES_USER_TOKEN" \
-F "file=@voice-note.m4a" \
-F "language=en"
{ "object": "transcription", "text": "Remind me what we decided about the kitchen tiles." }
  • file — the clip, as multipart/form-data: an audio file up to 25 MB.
  • language — optional: the spoken language's code, such as en. A regional tag such as en-US counts as its language. Leave it out, or send auto, to have the language inferred from the audio.
  • Transcribing needs a spendable balance on the project's billing account.
StatusCodeMeaning
413file_too_largeThe clip is over 25 MB.
422unsupported_media_type, validation_failedNot an audio clip; an empty clip, or one whose audio cannot be read; or a language that is not a language code.
502upstream_errorThe clip could not be transcribed. Retry, or try another recording.
503service_unavailableTranscription is temporarily unavailable. Retry shortly.

For a live, spoken conversation, use realtime voice instead: it transcribes both sides as they speak.