Skip to content

language_detection message

The language spoken, once the engine knows it: a gaia session then moves to the model that serves it best (receive_realtime_processing_events).

Delivery

On the WebSocket with messages_config.receive_realtime_processing_events; to your callback as live.language_detection with callback_config.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 "language_detection" required
  • data object required

    The language spoken, as the engine detected it (model: "gaia").

    6 fields
    • language string required

      The language spoken (ISO 639-1).

    • confidence number required

      How sure the engine is.

      0 to 1

    • speech_s number

      The seconds of speech it decided on.

      default: null

    • low_confidence boolean

      true: too unsure to act on; a gaia session stays on its model.

      default: false

    • model string

      The detector that decided.

      default: null

    • alternatives array of object

      The runners-up, the likeliest first.

      2 fields
      • language string required

        Another language it may be (ISO 639-1).

      • confidence number required

        0 to 1

Example

{
"session_id": "string",
"created_at": "string",
"type": "language_detection",
"data": {
"language": "fr",
"confidence": 0.93,
"speech_s": 2.1,
"low_confidence": false,
"model": "language-id-v2",
"alternatives": [
{
"language": "en",
"confidence": 0.04
}
]
}
}