Table of Contents

Class LiveSendRealtimeInputParameters

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Parameters for sending realtime input to the live API.

public record LiveSendRealtimeInputParameters : IEquatable<LiveSendRealtimeInputParameters>
Inheritance
LiveSendRealtimeInputParameters
Implements
Inherited Members

Properties

ActivityEnd

Marks the end of user activity.

[JsonPropertyName("activityEnd")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ActivityEnd? ActivityEnd { get; set; }

Property Value

ActivityEnd

ActivityStart

Marks the start of user activity.

[JsonPropertyName("activityStart")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ActivityStart? ActivityStart { get; set; }

Property Value

ActivityStart

Audio

The realtime audio input stream.

[JsonPropertyName("audio")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Blob? Audio { get; set; }

Property Value

Blob

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.

[JsonPropertyName("audioStreamEnd")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? AudioStreamEnd { get; set; }

Property Value

bool?

Media

Realtime input to send to the session.

[JsonPropertyName("media")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Blob? Media { get; set; }

Property Value

Blob

Text

The realtime text input stream.

[JsonPropertyName("text")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Text { get; set; }

Property Value

string

Video

The realtime video input stream.

[JsonPropertyName("video")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Blob? Video { get; set; }

Property Value

Blob

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a LiveSendRealtimeInputParameters object.

public static LiveSendRealtimeInputParameters? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

LiveSendRealtimeInputParameters

The deserialized LiveSendRealtimeInputParameters object, or null if deserialization fails.