| external help file | PSOpenAI-help.xml |
|---|---|
| Module Name | PSOpenAI |
| online version | https://github.com/mkht/PSOpenAI/blob/main/Docs/Set-RealtimeSessionConfiguration.md |
| schema | 2.0.0 |
Set the realtime session's configuration.
Set-RealtimeSessionConfiguration
[-EventId <String>]
[-Instructions <String>]
[-PromptId <String>]
[-PromptVariables <IDictionary>]
[-PromptVersion <String>]
[-OutputModalities <String[]>]
[-Voice <String>]
[-Speed <Double>]
[-InputAudioFormat <String>]
[-OutputAudioFormat <String>]
[-InputAudioNoiseReductionType <String>]
[-EnableInputAudioTranscription <Boolean>]
[-InputAudioTranscriptionModel <String>]
[-InputAudioTranscriptionLanguage <String>]
[-InputAudioTranscriptionPrompt <String>]
[-EnableTurnDetection <Boolean>]
[-TurnDetectionType <String>]
[-TurnDetectionEagerness <String>]
[-TurnDetectionThreshold <Single>]
[-TurnDetectionPrefixPadding <UInt16>]
[-TurnDetectionSilenceDuration <UInt16>]
[-TurnDetectionIdleTimeout <UInt16>]
[-CreateResponseOnTurnEnd <Boolean>]
[-InterruptResponse <Boolean>]
[-Tools <IDictionary[]>]
[-ToolChoice <String>]
[-Temperature <Single>]
[-MaxOutputTokens <Int32>]
[-Tracing <String>]
[-TracingGroupId <String>]
[-TracingMetadata <IDictionary>]
[-TracingWorkflowName <String>]
[-Truncation <String>]
[-TruncationRetentionRatio <Float>]
[-TruncationTokenLimitsPostInstructions <Int32>]
Set the realtime session's configuration.
PS C:\> Set-RealtimeSessionConfiguration `
-OutputModalities 'audio' `
-Voice 'marin' `
-EnableInputAudioTranscription $true `
-EnableTurnDetection $trueEnables input audio transcription.
Type: Boolean
Required: False
Position: NamedEnables the server VAD mode. In this mode, the server will run voice activity detection (VAD) over the incoming audio and respond after the end of speech.
Type: Boolean
Required: False
Position: NamedOptional client-generated ID used to identify this event.
Type: String
Required: False
Position: NamedThe format of input audio. Options are pcm16, g711_ulaw, or g711_alaw.
Type: String
Required: False
Position: NamedType of noise reduction. none is disable, near_field is for close-talking microphones such as headphones, far_field is for far-field microphones such as laptop or conference room microphones.
Type: String
Required: False
Position: NamedThe model to use for transcription, current options are gpt-4o-transcribe, gpt-4o-mini-transcribe, and whisper-1
Type: String
Required: False
Position: Named
Default value: whisper-1The language of the input audio. Supplying the input language in ISO-639-1 (e.g. en) format will improve accuracy and latency.
Type: String
Required: False
Position: NamedAn optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.
Type: String
Required: False
Position: NamedThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses.
Type: String
Required: False
Position: NamedThe unique identifier of the prompt template to use.
Type: String
Required: False
Position: NamedOptional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files.
Type: IDictionary
Required: False
Position: NamedOptional version of the prompt template.
Type: String
Required: False
Position: NamedMaximum number of output tokens for a single assistant response. Provide an integer between 1 and 4096 to limit output tokens, or -1 for no limitations.
Type: Int32
Required: False
Position: Named
Default value: -1The set of modalities the model can respond with.
Type: String[]
Accepted values: text, audio
Required: False
Position: NamedThe format of output audio. Options are pcm16, g711_ulaw, or g711_alaw.
Type: String
Required: False
Position: NamedSampling temperature for the model, limited to [0.6, 1.2].
Type: Single
Required: False
Position: NamedHow the model chooses tools. Options are auto, none, required, or specify a function.
Type: String
Required: False
Position: NamedTools (functions) available to the model.
Type: IDictionary[]
Required: False
Position: NamedAmount of audio to include before the VAD detected speech (in milliseconds).
Type: UInt16
Required: False
Position: NamedDuration of silence to detect speech stop (in milliseconds). With shorter values the model will respond more quickly, but may jump in on short pauses from the user.
Type: UInt16
Required: False
Position: NamedActivation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher threshold will require louder audio to activate the model, and thus might perform better in noisy environments.
Type: Single
Required: False
Position: NamedType of turn detection, server_vad is automatically chunks the audio based on periods of silence, semantic_vad is chunks the audio when the model believes based on the words said by the user that they have completed their utterance.
Type: String
Required: False
Position: Named
Default value: server_vadUsed only for semantic_vad mode. The eagerness of the model to respond. low will wait longer for the user to continue speaking, high will respond more quickly. auto is the default and is equivalent to medium.
Type: String
Required: False
Position: Named
Default value: autoWhether or not to automatically generate a response when VAD is enabled. true by default.
Type: Boolean
Required: False
Position: Named
Default value: TrueWhether or not to automatically interrupt any ongoing response with output to the default conversation when a VAD start event occurs. true by default.
Type: Boolean
Required: False
Position: Named
Default value: TrueThe voice the model uses to respond. Cannot be changed once the model has responded with audio at least once.
Type: String
Required: False
Position: NamedThe speed of the model's spoken response. 1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed.
Type: Double
Required: False
Position: NamedConfiguration options for tracing. Set to null to disable tracing. Once tracing is enabled for a session, the configuration cannot be modified. auto will create a trace for the session with default settings.
Type: String
Required: False
Position: NamedThe group id to attach to this trace to enable filtering and grouping in the traces dashboard.
Type: String
Required: False
Position: NamedThe arbitrary metadata to attach to this trace to enable filtering in the traces dashboard.
Type: IDictionary
Required: False
Position: NamedThe name of the workflow to attach to this trace. This is used to name the trace in the traces dashboard.
Type: String
Required: False
Position: NamedThe truncation strategy to use for the session. auto is the default truncation strategy. disabled will disable truncation and emit errors when the conversation exceeds the input token limit.
Type: String
Required: False
Position: NamedFraction of post-instruction conversation tokens to retain (0.0 - 1.0) when the conversation exceeds the input token limit.
Type: Float
Required: False
Position: NamedMaximum tokens allowed in the conversation after instructions (which including tool definitions).
Type: Int32
Required: False
Position: Namedhttps://developers.openai.com/api/reference/resources/realtime/subresources/sessions/methods/create/