Class LiveClientRealtimeInput
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).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for LiveClientRealtimeInput. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Optional<ActivityEnd>
Marks the end of user activity.abstract Optional<ActivityStart>
Marks the start of user activity.audio()
The realtime audio input stream.Indicates that the audio stream has ended, e.g.builder()
Instantiates a builder for LiveClientRealtimeInput.static LiveClientRealtimeInput
Deserializes a JSON string to a LiveClientRealtimeInput object.Inlined bytes data for media input.text()
The realtime text input stream.abstract LiveClientRealtimeInput.Builder
Creates a builder with the same values as this instance.video()
The realtime video input stream.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
LiveClientRealtimeInput
public LiveClientRealtimeInput()
-
-
Method Details
-
mediaChunks
Inlined bytes data for media input. -
audio
The realtime audio input stream. -
audioStreamEnd
Indicates that the audio stream has ended, e.g. because the microphone was turned off.This should only be sent when automatic activity detection is enabled (which is the default).
The client can reopen the stream by sending an audio message.
-
video
The realtime video input stream. -
text
The realtime text input stream. -
activityStart
Marks the start of user activity. -
activityEnd
Marks the end of user activity. -
builder
Instantiates a builder for LiveClientRealtimeInput. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a LiveClientRealtimeInput object.
-