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, asmultipart/form-data: an audio file up to 25 MB.language— optional: the spoken language's code, such asen. A regional tag such asen-UScounts as its language. Leave it out, or sendauto, to have the language inferred from the audio.- Transcribing needs a spendable balance on the project's billing account.
| Status | Code | Meaning |
|---|---|---|
413 | file_too_large | The clip is over 25 MB. |
422 | unsupported_media_type, validation_failed | Not an audio clip; an empty clip, or one whose audio cannot be read; or a language that is not a language code. |
502 | upstream_error | The clip could not be transcribed. Retry, or try another recording. |
503 | service_unavailable | Transcription is temporarily unavailable. Retry shortly. |
For a live, spoken conversation, use realtime voice instead: it transcribes both sides as they speak.