pub struct RealtimeTranslationClientEventInputAudioBufferAppend {
pub event_id: Option<String>,
pub audio: String,
}realtime-types only.Expand description
Send this event to append audio bytes to the translation session input audio buffer.
WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono little-endian raw audio bytes. Unsupported websocket audio formats return a validation error because lower-quality audio materially degrades translation quality.
Translation consumes 200 ms engine frames. For best realtime behavior, append audio in 200 ms chunks. If a chunk is shorter, the server buffers it until it has enough audio for one frame. If a chunk is longer, the server splits it into 200 ms frames and enqueues them back-to-back.
Keep appending silence while the session is active. If a client stops sending audio and later resumes, model time treats the resumed audio as contiguous with the previous audio rather than as a real-world pause.
Fields§
§event_id: Option<String>Optional client-generated ID used to identify this event.
audio: StringBase64-encoded 24 kHz PCM16 mono audio bytes.
Trait Implementations§
Source§impl Clone for RealtimeTranslationClientEventInputAudioBufferAppend
impl Clone for RealtimeTranslationClientEventInputAudioBufferAppend
Source§fn clone(&self) -> RealtimeTranslationClientEventInputAudioBufferAppend
fn clone(&self) -> RealtimeTranslationClientEventInputAudioBufferAppend
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more