Transcription and translation
Transcription and translation
Section titled “Transcription and translation”The server exposes two OpenAI-compatible speech endpoints. Both accept a multipart form upload and return the transcript in the format you request.
The two endpoints
Section titled “The two endpoints”| Endpoint | Task | Language behavior |
|---|---|---|
POST /v1/audio/transcriptions | Transcribe speech in its original language | Auto-detects, or force with language |
POST /v1/audio/translations | Translate speech into English | Always auto-detects the source; no language field |
Both endpoints require authentication only when an API_KEY is set (see
Configuration overview) and both return 503
while the model is still warming (see
Health and readiness).
Request fields
Section titled “Request fields”transcriptions accepts: file (required), language (optional; omit to
auto-detect), prompt (optional decoding hint), response_format,
timestamp_granularities[], and model (accepted but ignored). translations
accepts file, prompt, and response_format — no language and no timestamp
granularities.
languageforces the source language (for examplees). When omitted, the server falls back toDEFAULT_LANGUAGEif configured, otherwise Whisper auto-detects. An unsupported language code returns400.promptbiases decoding with an initial context string — useful for names, jargon, or acronyms. It maps to Whisper’sinitial_prompt.- Voice-activity detection filtering is applied by default
(
ENABLE_VAD_FILTER=true) to skip non-speech. - Beam size comes from
BEAM_SIZE(default5).
Response formats
Section titled “Response formats”response_format accepts five values. The default is json.
| Value | Body | Content type |
|---|---|---|
text | Raw transcript | text/plain |
json | {"text": "..."} | application/json |
verbose_json | Task, language, duration, text, segments[], optional words[] | application/json |
srt | SubRip subtitle text (HH:MM:SS,mmm) | text/plain |
vtt | WebVTT subtitle text (HH:MM:SS.mmm) | text/plain |
The web console offers
text,json, andverbose_json, and builds.srt/.vttdownloads on the client fromverbose_jsonsegments. The server also acceptssrtandvttasresponse_formatvalues directly.
Word-level timestamps
Section titled “Word-level timestamps”Add timestamp_granularities[]=word with response_format=verbose_json to get
per-word timings:
curl -X POST http://localhost:8000/v1/audio/transcriptions \ -F 'file=@audio.mp3' \ -F 'response_format=verbose_json' \ -F 'timestamp_granularities[]=word'Words are returned as a flattened top-level words array of
{word, start, end, probability} — they are not nested inside segments. Each
segment carries id, seek, start, end, text, tokens, temperature, avg_logprob, compression_ratio, no_speech_prob. See the
OpenAI-compatible API reference for the full schema.
Translation
Section titled “Translation”POST /v1/audio/translations takes the same multipart body minus language and
translates any supported source language into English:
curl -X POST http://localhost:8000/v1/audio/translations \ -F 'file=@spanish.mp3' -F 'response_format=text'Related
Section titled “Related”- Model selection — which model produces these results.
- Privacy and responsible use — how the audio and transcript are handled.