# translation message

One final translated into one target language (`receive_realtime_processing_events`).

## Fields

- `session_id` (string, required): Identifier of the session.
- `created_at` (string, required): When the message was sent (ISO 8601, UTC).
- `type` ("translation", required)
- `error` (any, default: `null`)
- `data` (object, required)
  - `utterance_id` (string, required)
  - `utterance` (object or object, required)
    - `text` (string, required): The transcript. With named entity recognition or PII redaction on, it carries their inline elements (`<ner:name id="1">…</ner:name>`, `<pii:email id="1"/>`).
    - `start` (number, required): Start, in seconds from the start of the audio.
    - `end` (number, required): End, in seconds from the start of the audio.
    - `language` (string, required): Language spoken (ISO 639-1).
    - `confidence` (number, required): Confidence, from 0 to 1.
    - `channel` (integer, required): Audio channel the utterance was heard on, from 0.
    - `speaker` (integer, default: `null`): Speaker number, with `diarization`.
    - `words` (array of object, required): The words with their timestamps.
      - `word` (string, required): The word, with its leading space when it follows another.
      - `start` (number, required): Start of the word, in seconds from the start of the audio.
      - `end` (number, required): End of the word, in seconds from the start of the audio.
      - `confidence` (number, required): Confidence, from 0 to 1.
      - `speaker` (integer, default: `null`): Speaker of the word, with `diarization`.
    - `text_raw` (string, default: `null`): The transcript without inline elements (with named entity recognition; never with PII redaction).
    - `entities` (array of object, default: `null`): The entities of the utterance, with named entity recognition or PII redaction.
      - `label` (string, default: `null`): Entity type, for example `name`, `phone_number`, `location_city`.
      - `id` (integer, default: `null`): The entity's number in the session, per type: the same person is always the same number.
      - `action` (string, default: `null`): `ner`: tagged; otherwise how the personal data was redacted.
      - `score` (number, default: `null`): Confidence, from 0 to 1.
      - `text` (string, default: `null`): The entity as heard (never sent for masked personal data unless `pii.return_entities`).
      - `start` (integer, default: `null`): Offset of the entity's element in `text`, in characters.
      - `end` (integer, default: `null`): End offset of the entity's element in `text`, in characters.
    - `forced` ("max_duration", default: `null`): Set when the utterance was closed by `maximum_duration_without_endpointing` rather than by a pause.
  - `original_language` (string, required)
  - `target_language` (string, required)
  - `translated_utterance` (object, required): `null` when the translation failed (see `error`).
    - `text` (string, required): The transcript. With named entity recognition or PII redaction on, it carries their inline elements (`<ner:name id="1">…</ner:name>`, `<pii:email id="1"/>`).
    - `start` (number, required): Start, in seconds from the start of the audio.
    - `end` (number, required): End, in seconds from the start of the audio.
    - `language` (string, required): Language spoken (ISO 639-1).
    - `confidence` (number, required): Confidence, from 0 to 1.
    - `channel` (integer, required): Audio channel the utterance was heard on, from 0.
    - `speaker` (integer, default: `null`): Speaker number, with `diarization`.
    - `words` (array of object, required): The words with their timestamps.
      - `word` (string, required): The word, with its leading space when it follows another.
      - `start` (number, required): Start of the word, in seconds from the start of the audio.
      - `end` (number, required): End of the word, in seconds from the start of the audio.
      - `confidence` (number, required): Confidence, from 0 to 1.
      - `speaker` (integer, default: `null`): Speaker of the word, with `diarization`.
    - `text_raw` (string, default: `null`): The transcript without inline elements (with named entity recognition; never with PII redaction).
    - `entities` (array of object, default: `null`): The entities of the utterance, with named entity recognition or PII redaction.
      - `label` (string, default: `null`): Entity type, for example `name`, `phone_number`, `location_city`.
      - `id` (integer, default: `null`): The entity's number in the session, per type: the same person is always the same number.
      - `action` (string, default: `null`): `ner`: tagged; otherwise how the personal data was redacted.
      - `score` (number, default: `null`): Confidence, from 0 to 1.
      - `text` (string, default: `null`): The entity as heard (never sent for masked personal data unless `pii.return_entities`).
      - `start` (integer, default: `null`): Offset of the entity's element in `text`, in characters.
      - `end` (integer, default: `null`): End offset of the entity's element in `text`, in characters.
    - `forced` ("max_duration", default: `null`): Set when the utterance was closed by `maximum_duration_without_endpointing` rather than by a pause.

## Example

```json
{
  "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"
    }
  }
}
```
