Language

VoiceLiveSessionResponse Class

Definition

Base for session configuration in the response.

public class VoiceLiveSessionResponse : System.ClientModel.Primitives.IJsonModel<Azure.AI.VoiceLive.VoiceLiveSessionResponse>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.VoiceLive.VoiceLiveSessionResponse>
type VoiceLiveSessionResponse = class
    interface IJsonModel<VoiceLiveSessionResponse>
    interface IPersistableModel<VoiceLiveSessionResponse>
Public Class VoiceLiveSessionResponse
Implements IJsonModel(Of VoiceLiveSessionResponse), IPersistableModel(Of VoiceLiveSessionResponse)
Inheritance
VoiceLiveSessionResponse
Implements

Constructors

Name Description
VoiceLiveSessionResponse()

Initializes a new instance of VoiceLiveSessionResponse.

Properties

Name Description
AllowParallelToolCalls

Whether the model is allowed to call tools in parallel.

Animation

The animation configuration for the session.

Avatar

Configuration for avatar streaming and behavior during the session.

ExpiresOn

Expiration time for the session. This value is set by the server and cannot be changed with session.update.

Id

The unique identifier for the session.

Include

List of include options for the session (e.g., logprobs, phrases, file search results).

InputAudioEchoCancellation

Configuration for echo cancellation during server-side audio processing.

InputAudioFormat

Input audio format. Default is 'pcm16'.

InputAudioNoiseReduction

Configuration for input audio noise reduction.

InputAudioSamplingRate

Input audio sampling rate in Hz. Available values:

  • For pcm16: 8000, 16000, 24000
  • For g711_alaw/g711_ulaw: 8000
InputAudioTranscription

Configuration for input audio transcription.

Instructions

Optional instructions to guide the model's behavior throughout the session.

InterimResponse

Configuration for interim response generation during latency or tool calls.

To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

<remarks> Supported types:

</remarks>

Examples:

  • BinaryData.FromObjectAsJson("foo"). : Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""). : Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }). : Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"). : Creates a payload of { "key": "value" }.

MaxResponseOutputTokens

Gets or sets the maximum number of tokens to generate in the response.

Metadata

Set of up to 16 key-value pairs that can be attached to the session. This is useful for storing additional information about the session in a structured format, such as tracking IDs, user context, or application-specific labels. These key-value pairs are also included in Foundry resource logs for tracing and diagnostics. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.

Modalities

The modalities to be used in the session.

Model

The model for the session.

OutputAudioFormat

Output audio format. Default is 'pcm16'.

OutputAudioTimestampTypes

Types of timestamps to include in audio response content.

ParallelToolCalls

Whether the model is allowed to call tools in parallel.

ReasoningEffort

Constrains effort on reasoning for reasoning models. Check model documentation for supported values for each model. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.

Temperature

Controls the randomness of the model's output. Range: 0.0 to 1.0. Default is 0.7.

ToolChoice

Gets or sets the tool choice strategy for response generation.

Tools

Configuration for tools to be used during the session, if applicable.

TurnDetection

Gets or sets the TurnDetection.

Voice

Gets or sets the Voice.

Methods

Name Description
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
PersistableModelWriteCore(ModelReaderWriterOptions)

Explicit Interface Implementations

Name Description
IJsonModel<VoiceLiveSessionResponse>.Create(Utf8JsonReader, ModelReaderWriterOptions)
IJsonModel<VoiceLiveSessionResponse>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
IPersistableModel<VoiceLiveSessionResponse>.Create(BinaryData, ModelReaderWriterOptions)
IPersistableModel<VoiceLiveSessionResponse>.GetFormatFromOptions(ModelReaderWriterOptions)
IPersistableModel<VoiceLiveSessionResponse>.Write(ModelReaderWriterOptions)

Applies to