LiveClientRealtimeInput

@Serializable
data class LiveClientRealtimeInput(val activityStart: ActivityStart? = null, val activityEnd: ActivityEnd? = null, val audio: Blob? = null, val audioStreamEnd: Boolean? = null, val video: Blob? = null, val text: String? = null)

User input that is sent in real time.

This is different from LiveClientContent in a few ways:

  • Can be sent continuously without interruption to model generation.

  • If there is a need to mix data interleaved across the LiveClientContent and the LiveClientRealtimeInput, server attempts to optimize for best response, but there are no guarantees.

  • End of turn is not explicitly specified, but is rather derived from user activity (for example, end of speech).

  • Even before the end of turn, the data is processed incrementally to optimize for a fast start of the response from the model.

  • Is always assumed to be the user's input (cannot be used to populate conversation history).

Constructors

Link copied to clipboard
constructor(activityStart: ActivityStart? = null, activityEnd: ActivityEnd? = null, audio: Blob? = null, audioStreamEnd: Boolean? = null, video: Blob? = null, text: String? = null)

Properties

Link copied to clipboard

Marks the end of user activity.

Link copied to clipboard

Marks the start of user activity.

Link copied to clipboard
val audio: Blob? = null

The realtime audio input stream.

Link copied to clipboard
val audioStreamEnd: Boolean? = null

Indicates that the audio stream has ended, e.g. because the microphone was turned off.

Link copied to clipboard
val text: String? = null

The realtime text input stream.

Link copied to clipboard
val video: Blob? = null

The realtime video input stream.