Share via


VoiceLiveModelFactory.VoiceLiveSessionOptions Method

Definition

Base for session configuration shared between request and response.

public static Azure.AI.VoiceLive.VoiceLiveSessionOptions VoiceLiveSessionOptions(string model = default, System.Collections.Generic.IEnumerable<Azure.AI.VoiceLive.InteractionModality> modalities = default, Azure.AI.VoiceLive.AnimationOptions animation = default, Azure.AI.VoiceLive.VoiceProvider voice = default, string instructions = default, int? inputAudioSamplingRate = default, Azure.AI.VoiceLive.InputAudioFormat? inputAudioFormat = default, Azure.AI.VoiceLive.OutputAudioFormat? outputAudioFormat = default, Azure.AI.VoiceLive.AudioNoiseReduction inputAudioNoiseReduction = default, Azure.AI.VoiceLive.AudioEchoCancellation inputAudioEchoCancellation = default, Azure.AI.VoiceLive.AvatarConfiguration avatar = default, Azure.AI.VoiceLive.AudioInputTranscriptionOptions inputAudioTranscription = default, System.Collections.Generic.IEnumerable<Azure.AI.VoiceLive.AudioTimestampType> outputAudioTimestampTypes = default, System.Collections.Generic.IEnumerable<Azure.AI.VoiceLive.VoiceLiveToolDefinition> tools = default, Azure.AI.VoiceLive.ToolChoiceOption toolChoice = default, float? temperature = default, Azure.AI.VoiceLive.MaxResponseOutputTokensOption maxResponseOutputTokens = default, BinaryData turnDetection = default);
static member VoiceLiveSessionOptions : string * seq<Azure.AI.VoiceLive.InteractionModality> * Azure.AI.VoiceLive.AnimationOptions * Azure.AI.VoiceLive.VoiceProvider * string * Nullable<int> * Nullable<Azure.AI.VoiceLive.InputAudioFormat> * Nullable<Azure.AI.VoiceLive.OutputAudioFormat> * Azure.AI.VoiceLive.AudioNoiseReduction * Azure.AI.VoiceLive.AudioEchoCancellation * Azure.AI.VoiceLive.AvatarConfiguration * Azure.AI.VoiceLive.AudioInputTranscriptionOptions * seq<Azure.AI.VoiceLive.AudioTimestampType> * seq<Azure.AI.VoiceLive.VoiceLiveToolDefinition> * Azure.AI.VoiceLive.ToolChoiceOption * Nullable<single> * Azure.AI.VoiceLive.MaxResponseOutputTokensOption * BinaryData -> Azure.AI.VoiceLive.VoiceLiveSessionOptions
Public Shared Function VoiceLiveSessionOptions (Optional model As String = Nothing, Optional modalities As IEnumerable(Of InteractionModality) = Nothing, Optional animation As AnimationOptions = Nothing, Optional voice As VoiceProvider = Nothing, Optional instructions As String = Nothing, Optional inputAudioSamplingRate As Nullable(Of Integer) = Nothing, Optional inputAudioFormat As Nullable(Of InputAudioFormat) = Nothing, Optional outputAudioFormat As Nullable(Of OutputAudioFormat) = Nothing, Optional inputAudioNoiseReduction As AudioNoiseReduction = Nothing, Optional inputAudioEchoCancellation As AudioEchoCancellation = Nothing, Optional avatar As AvatarConfiguration = Nothing, Optional inputAudioTranscription As AudioInputTranscriptionOptions = Nothing, Optional outputAudioTimestampTypes As IEnumerable(Of AudioTimestampType) = Nothing, Optional tools As IEnumerable(Of VoiceLiveToolDefinition) = Nothing, Optional toolChoice As ToolChoiceOption = Nothing, Optional temperature As Nullable(Of Single) = Nothing, Optional maxResponseOutputTokens As MaxResponseOutputTokensOption = Nothing, Optional turnDetection As BinaryData = Nothing) As VoiceLiveSessionOptions

Parameters

model
String

The model for the session.

modalities
IEnumerable<InteractionModality>

The modalities to be used in the session.

animation
AnimationOptions

The animation configuration for the session.

voice
VoiceProvider

The voice configuration for the session.

instructions
String

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

inputAudioSamplingRate
Nullable<Int32>

Input audio sampling rate in Hz. Available values:

  • For pcm16: 8000, 16000, 24000

  • For g711_alaw/g711_ulaw: 8000

inputAudioFormat
Nullable<InputAudioFormat>

Input audio format. Default is 'pcm16'.

outputAudioFormat
Nullable<OutputAudioFormat>

Output audio format. Default is 'pcm16'.

inputAudioNoiseReduction
AudioNoiseReduction

Configuration for input audio noise reduction.

inputAudioEchoCancellation
AudioEchoCancellation

Configuration for echo cancellation during server-side audio processing.

avatar
AvatarConfiguration

Configuration for avatar streaming and behavior during the session.

inputAudioTranscription
AudioInputTranscriptionOptions

Configuration for input audio transcription.

outputAudioTimestampTypes
IEnumerable<AudioTimestampType>

Types of timestamps to include in audio response content.

tools
IEnumerable<VoiceLiveToolDefinition>

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

toolChoice
ToolChoiceOption

Specifies which tools the model is allowed to call during the session.

temperature
Nullable<Single>

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

maxResponseOutputTokens
MaxResponseOutputTokensOption

Maximum number of tokens to generate in the response. Default is unlimited.

turnDetection
BinaryData

Type of turn detection to use.

Returns

A new VoiceLiveSessionOptions instance for mocking.

Applies to