Skip to main content

Alternative API modes

You can enable captions only or captions with translation modes by adjusting the task options.
Depending on your input_stream, use WebSockets or WebRTC DataChannel to receive caption messages.
Refer to the recommended settings for exact option values.

Captions only

All input_stream and transcription options are supported.

{
"input_stream": {/*...*/},
"output_stream": null, // set to `null`
"pipeline": {
"transcription": {/*...*/},
"translations": [], // set to an empty list
"allowed_message_types": [
// you will only receive messages of these types
"partial_transcription",
"validated_transcription"
]
}
}

Captions with translations

To enable this mode, set output_stream to null. You may omit the speech_generation options if not needed.
All standard task options are supported — see the recommended settings.

{
"input_stream": {/*...*/},
"output_stream": null, // set to `null`
"pipeline": {/*...*/}
}