{
"source_media_chunk": {
"data": "VGhpcyBpcyBhIGZha2UgYXVkaW8gY2h1bmsK"
}
}{
"end_of_source_media": {}
}{
"source_transcript_update": {
"concluded": [
{
"language": "en",
"text": "Hello, how are you",
"start_time": 0,
"end_time": 1500
}
],
"tentative": [
{
"language": "en",
"text": " today?",
"start_time": 1500,
"end_time": 2000
}
]
}
}{
"target_transcript_update": {
"language": "es",
"concluded": [
{
"text": "Hola, ¿cómo estás",
"start_time": 0,
"end_time": 1500
}
],
"tentative": [
{
"text": " hoy?",
"start_time": 1500,
"end_time": 2000
}
]
}
}{
"end_of_source_transcript": {}
}{
"end_of_target_transcript": {
"language": "fr"
}
}{
"end_of_stream": {}
}{
"error": {
"request_type": "source_media_chunk",
"error_code": 400,
"reason_code": 4000403,
"error_message": "Audio format not supported"
}
}{
"source_media_chunk": {
"data": "VGhpcyBpcyBhIGZha2UgYXVkaW8gY2h1bmsK"
}
}{
"end_of_source_media": {}
}{
"source_transcript_update": {
"concluded": [
{
"language": "en",
"text": "Hello, how are you",
"start_time": 0,
"end_time": 1500
}
],
"tentative": [
{
"language": "en",
"text": " today?",
"start_time": 1500,
"end_time": 2000
}
]
}
}{
"target_transcript_update": {
"language": "es",
"concluded": [
{
"text": "Hola, ¿cómo estás",
"start_time": 0,
"end_time": 1500
}
],
"tentative": [
{
"text": " hoy?",
"start_time": 1500,
"end_time": 2000
}
]
}
}{
"end_of_source_transcript": {}
}{
"end_of_target_transcript": {
"language": "fr"
}
}{
"end_of_stream": {}
}{
"error": {
"request_type": "source_media_chunk",
"error_code": 400,
"reason_code": 4000403,
"error_message": "Audio format not supported"
}
}This is the ephemeral authentication token obtained from the Get Streaming URL endpoint. The token is valid for one-time use only and must be passed as a query parameter when establishing the WebSocket connection.
The message contains a base64-encoded binary chunk of audio data. The audio encoding must be the same that was specified in the Get Streaming URL request.
The chunk size must not be more than 100 kilobyte or one second in duration. The recommended duration is 50 - 250 milliseconds to achieve the best tradeoff between latency and quality. The interval between chunks must not be less than half of the duration of the preceding chunk and not exceed 30 seconds. Otherwise you'll run into rate limits or the session will time out and the stream closes forcibly.
For PCM data the chunk size must be a multiple of the frame size aka encoding unit.
The message indicates the end of source media data. It causes the finalization of tentative transcript segments and triggers the emission of final transcript updates, end of transcript messages and the end of stream message. No more data chunks can be sent afterwards. It marks the end of the stream input.
The message contains an update to the transcription of the supplied media in the source language.
Each message is an incremental addition to the already received updates of the source transcript with concluded and tentative text segments. Concluded segments are fixed and will only appear once, while tentative segments may be updated in subsequent messages as more audio is processed.
Clients should merge the concluded segments into a final transcript and update the tentative segments as new updates arrive.
The message contains an update to the transcription of the supplied media in the target language.
Each message is an incremental addition to the already received updates of the target transcript with concluded and tentative text segments. Concluded segments are fixed and will only appear once, while tentative segments may be updated in subsequent messages as more audio is processed.
Clients should merge the concluded segments into a final transcript and update the tentative segments as new updates arrive.
The message indicates that the source transcript is complete and no further updates will be sent. It gets emitted after client sends End of Source Media.
This message indicates that the target transcript is complete and no further updates will be sent. It gets emitted after client sends End of Source Media.
This message indicates that all outputs are complete and the stream ended. It is the very last message the client will receive after it sends End of Source Media. You can safely close the connection after you received this message.
This message reports errors encountered during audio processing or streaming. It includes an error code, reason code, and a human-readable message. You should close and reopen the stream after receiving an error message.