translation message
One final translated into one target language (receive_realtime_processing_events).
Delivery
On the WebSocket with messages_config.receive_realtime_processing_events; to your callback as live.translation with callback_config.receive_realtime_processing_events.
Fields
-
session_idstring requiredIdentifier of the session.
-
created_atstring requiredWhen the message was sent (ISO 8601, UTC).
-
type"translation" required -
erroranydefault:
null -
dataobject required5 fields
-
utterance_idstring required -
utteranceobject or object required11 fields
-
textstring requiredThe transcript. With named entity recognition or PII redaction on, it carries their inline elements (
<ner:name id="1">…</ner:name>,<pii:email id="1"/>). -
startnumber requiredStart, in seconds from the start of the audio.
-
endnumber requiredEnd, in seconds from the start of the audio.
-
languagestring requiredLanguage spoken (ISO 639-1).
-
confidencenumber requiredConfidence, from 0 to 1.
-
channelinteger requiredAudio channel the utterance was heard on, from 0.
-
speakerintegerSpeaker number, with
diarization.default:
null -
wordsarray of object requiredThe words with their timestamps.
5 fields
-
wordstring requiredThe word, with its leading space when it follows another.
-
startnumber requiredStart of the word, in seconds from the start of the audio.
-
endnumber requiredEnd of the word, in seconds from the start of the audio.
-
confidencenumber requiredConfidence, from 0 to 1.
-
speakerintegerSpeaker of the word, with
diarization.default:
null
-
-
text_rawstringThe transcript without inline elements (with named entity recognition; never with PII redaction).
default:
null -
entitiesarray of objectThe entities of the utterance, with named entity recognition or PII redaction.
default:
null7 fields
-
labelstringEntity type, for example
name,phone_number,location_city.default:
null -
idintegerThe entity's number in the session, per type: the same person is always the same number.
default:
null -
actionstringner: tagged; otherwise how the personal data was redacted.default:
null -
scorenumberConfidence, from 0 to 1.
default:
null -
textstringThe entity as heard (never sent for masked personal data unless
pii.return_entities).default:
null -
startintegerOffset of the entity's element in
text, in characters.default:
null -
endintegerEnd offset of the entity's element in
text, in characters.default:
null
-
-
forced"max_duration"Set when the utterance was closed by
maximum_duration_without_endpointingrather than by a pause.default:
null
-
-
original_languagestring required -
target_languagestring required -
translated_utteranceobject requirednullwhen the translation failed (seeerror).11 fields
-
textstring requiredThe transcript. With named entity recognition or PII redaction on, it carries their inline elements (
<ner:name id="1">…</ner:name>,<pii:email id="1"/>). -
startnumber requiredStart, in seconds from the start of the audio.
-
endnumber requiredEnd, in seconds from the start of the audio.
-
languagestring requiredLanguage spoken (ISO 639-1).
-
confidencenumber requiredConfidence, from 0 to 1.
-
channelinteger requiredAudio channel the utterance was heard on, from 0.
-
speakerintegerSpeaker number, with
diarization.default:
null -
wordsarray of object requiredThe words with their timestamps.
5 fields
-
wordstring requiredThe word, with its leading space when it follows another.
-
startnumber requiredStart of the word, in seconds from the start of the audio.
-
endnumber requiredEnd of the word, in seconds from the start of the audio.
-
confidencenumber requiredConfidence, from 0 to 1.
-
speakerintegerSpeaker of the word, with
diarization.default:
null
-
-
text_rawstringThe transcript without inline elements (with named entity recognition; never with PII redaction).
default:
null -
entitiesarray of objectThe entities of the utterance, with named entity recognition or PII redaction.
default:
null7 fields
-
labelstringEntity type, for example
name,phone_number,location_city.default:
null -
idintegerThe entity's number in the session, per type: the same person is always the same number.
default:
null -
actionstringner: tagged; otherwise how the personal data was redacted.default:
null -
scorenumberConfidence, from 0 to 1.
default:
null -
textstringThe entity as heard (never sent for masked personal data unless
pii.return_entities).default:
null -
startintegerOffset of the entity's element in
text, in characters.default:
null -
endintegerEnd offset of the entity's element in
text, in characters.default:
null
-
-
forced"max_duration"Set when the utterance was closed by
maximum_duration_without_endpointingrather than by a pause.default:
null
-
-
Example
{ "session_id": "string", "created_at": "string", "type": "translation", "error": null, "data": { "utterance_id": "string", "utterance": { "text": "Hello, how can I help you?", "start": 0.5, "end": 0.5, "language": "en", "confidence": 0.5, "channel": 0, "speaker": 0, "words": [ { "word": " hello", "start": 0.5, "end": 0.5, "confidence": 0.5, "speaker": 0 } ], "text_raw": "string", "entities": [ { "label": "string", "id": 0, "action": "string", "score": 0.5, "text": "string", "start": 0, "end": 0 } ], "forced": "max_duration" }, "original_language": "string", "target_language": "string", "translated_utterance": { "text": "Hello, how can I help you?", "start": 0.5, "end": 0.5, "language": "en", "confidence": 0.5, "channel": 0, "speaker": 0, "words": [ { "word": " hello", "start": 0.5, "end": 0.5, "confidence": 0.5, "speaker": 0 } ], "text_raw": "string", "entities": [ { "label": "string", "id": 0, "action": "string", "score": 0.5, "text": "string", "start": 0, "end": 0 } ], "forced": "max_duration" } }}