Authorizations
Authentication with Authorization header and DeepL-Auth-Key authentication scheme. Example: DeepL-Auth-Key <api-key>
Body
The audio format for streaming, which specifies container, codec, and encoding parameters. See the table below for supported formats. If audio/auto is specified, the server will auto-detect the container and codec for all supported combinations, except PCM. That requires explicit encoding parameters. All formats need to be single channel audio.
| Content Type | Container | Codec |
|---|---|---|
audio/auto | Auto-detect: FLAC / Matroska / MPEG / Ogg/WebM | Auto-detect AAC / FLAC / MP3/ OPUS |
audio/flac | FLAC (flac) | FLAC, interleaved |
audio/mpeg | MPEG (mp3/m4a) | MP3 |
audio/ogg | Ogg (ogg/oga) | Auto-detect FLAC / OPUS |
audio/webm | WebM (webm) | OPUS |
audio/x-matroska | Matroska (mkv/mka) | Auto-detect: AAC / FLAC / MP3 / OPUS |
audio/ogg;codecs=flac | Ogg (ogg/oga) | FLAC, interleaved |
audio/ogg;codecs=opus | Ogg (ogg/oga) | OPUS |
audio/pcm;encoding=s16le;rate=8000 | - | PCM signed 16-bit little-endian, 8000 Hz, interleaved |
audio/pcm;encoding=s16le;rate=16000 | - | PCM signed 16-bit little-endian, 16000 Hz, interleaved |
audio/pcm;encoding=s16le;rate=44100 | - | PCM signed 16-bit little-endian, 44100 Hz, interleaved |
audio/pcm;encoding=s16le;rate=48000 | - | PCM signed 16-bit little-endian, 48000 Hz, interleaved |
audio/webm;codecs=opus | WebM (webm) | OPUS |
audio/x-matroska;codecs=aac | Matroska (mkv/mka) | AAC |
audio/x-matroska;codecs=flac | Matroska (mkv/mka) | FLAC, interleaved |
audio/x-matroska;codecs=mp3 | Matroska (mkv/mka) | MP3 |
audio/x-matroska;codecs=opus | Matroska (mkv/mka) | OPUS |
We recommend the following bitrates as good tradeoff between quality and bandwidth:
- AAC: 96 kbps
- FLAC: 256 kbps (16000 Hz)
- MP3: 128 kbps
- OPUS: 32 kbps (recommendation for low bandwidth scenarios)
- PCM: 256 kbps (16000 Hz, default recommendation)
audio/auto, audio/flac, audio/mpeg, audio/ogg, audio/webm, audio/x-matroska, audio/ogg;codecs=flac, audio/ogg;codecs=opus, audio/pcm;encoding=s16le;rate=8000, audio/pcm;encoding=s16le;rate=16000, audio/pcm;encoding=s16le;rate=44100, audio/pcm;encoding=s16le;rate=48000, audio/webm;codecs=opus, audio/x-matroska;codecs=aac, audio/x-matroska;codecs=flac, audio/x-matroska;codecs=mp3, audio/x-matroska;codecs=opus "audio/ogg;codecs=opus"
The source language of the audio stream. It can be left empty or must be one of the supported Voice API source languages and comply with IETF BCP 47 language tags.
de, cs, en, es, fr, id, it, ja, ko, nl, pl, pt, ro, ru, sv, tr, uk, zh "en"
Controls how the source_language value is used.
auto: Treats source language as a hint; server can overridefixed: Treats source language as mandatory; server must use this language
auto, fixed "fixed"
List of target languages for translation. The stream will emit translations for each language. The maximum allowed target languages per stream is 5. Language identifiers must comply with IETF BCP 47.
5["de", "fr", "es"]A unique ID assigned to a glossary.
"def3a26b-3e84-45b3-84ae-0c0aaf3525f7"
Sets whether the translated text should lean towards formal or informal language. Possible options are:
default- use the default formality for the target languageformal/more- for a more formal languageinformal/less- for a more informal language
default, formal, more, informal, less "formal"
Response
Successfully obtained streaming URL and token.
The WebSocket URL to use for establishing the stream connection.
"wss://api.deepl.com/v3/voice/realtime/connect"
A unique ephemeral token for authentication with the streaming endpoint. Pass this as a query parameter when connecting to the streaming URL. This token is ephemeral and valid for a short time and one-time use only.
"VGhpcyBpcyBhIGZha2UgdG9rZW4K"
Internal use only. A unique identifier for the requested stream.
"4f911080-cfe2-41d4-8269-0e6ec15a0354"