Skip to content

audio_passthrough message

The session's audio, echoed back with the beeps of the audio redaction (audio_redaction, receive_realtime_processing_events): one message per packet the client sent, in its own encoding and rate, so it can play back what the far end should hear.

Delivery

Always on the WebSocket when its option is on; never to the callback.

Fields

  • session_id string required

    Identifier of the session.

  • created_at string required

    When the message was sent (ISO 8601, UTC).

  • type "audio_passthrough" required
  • data object required
    7 fields
    • encoding string required

      The encoding of the audio, as the session sent it.

    • sample_rate integer required

      The sample rate of the audio, in hertz.

    • channels integer required

      Interleaved channels, as the session sent them.

    • audio string required

      The client's audio, base64: its own samples, the channels being redacted replaced by a beep.

    • start number required

      Where audio starts on the session's timeline, seconds.

    • end number required

      Where it ends, seconds.

    • redacted object required

      The label beeped on each channel, by channel index; empty when nothing is.

Example

{
"session_id": "string",
"created_at": "string",
"type": "audio_passthrough",
"data": {
"encoding": "string",
"sample_rate": 0,
"channels": 0,
"audio": "string",
"start": 0.5,
"end": 0.5,
"redacted": {}
}
}