You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// The language of the input audio. Supplying the input language in ISO-639-1 (e.g. `en`) format will improve accuracy and latency.
76
73
publicvarlanguage:String?
77
74
78
75
/// An optional text to guide the model's style or continue a previous audio segment.
79
76
///
80
-
/// For `whisper`, the [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting). For `gpt4o` models, the prompt is a free text string, for example "expect words related to technology".
77
+
/// For `whisper`, the [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting).
78
+
/// For `gpt4o` models, the prompt is a free text string, for example "expect words related to technology".
/// Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0).
120
-
publicvarthreshold:Double?
112
+
/// Whether or not to automatically generate a response when a VAD stop event occurs.
113
+
publicvarcreateResponse:Bool
114
+
115
+
/// Used only for `semanticVad` mode. The eagerness of the model to respond.
116
+
///
117
+
/// `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`.
118
+
publicvareagerness:TurnDetectionEagerness?
119
+
120
+
/// Optional idle timeout after which turn detection will auto-timeout when no additional audio is received.
121
+
publicvaridleTimeout:Int?
122
+
121
123
/// Whether or not to automatically interrupt any ongoing response with output to the default conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.
122
124
publicvarinterruptResponse:Bool?
123
-
/// Used only for `server_vad` mode. Amount of audio to include before speech starts (in milliseconds).
125
+
126
+
/// Used only for `serverVad` mode. Amount of audio to include before speech starts (in milliseconds).
127
+
///
128
+
/// Defaults to `300ms`.
124
129
publicvarprefixPaddingMs:Int?
125
-
/// Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds).
130
+
131
+
/// Used only for `serverVad` mode. Duration of silence to detect speech stop (in milliseconds).
132
+
///
133
+
/// Defaults to `500ms`.
134
+
///
135
+
/// With shorter values the model will respond more quickly, but may jump in on short pauses from the user.
126
136
publicvarsilenceDurationMs:Int?
127
-
/// Whether or not to automatically generate a response when VAD is enabled.
128
-
publicvarcreateResponse:Bool
129
-
/// Used 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`.
/// Used only for `serverVad` mode. Activation threshold for VAD (0.0 to 1.0).
139
+
///
140
+
/// A higher threshold will require louder audio to activate the model, and thus might perform better in noisy environments.
141
+
publicvarthreshold:Double?
142
+
143
+
/// The type of turn detection.
144
+
publicvartype:TurnDetectionType
145
+
146
+
/// Creates a new `TurnDetection` configuration.
147
+
///
148
+
/// - Parameter createResponse: Whether or not to automatically generate a response when a VAD stop event occurs.
149
+
/// - Parameter eagerness: Only for `semanticVad` mode. The eagerness of the model to respond.
150
+
/// - Parameter idleTimeout: Optional idle timeout after which turn detection will auto-timeout when no additional audio is received.
151
+
/// - Parameter interruptResponse: Whether or not to automatically interrupt any ongoing response with output to the default conversation when a VAD start event occurs.
152
+
/// - Parameter prefixPaddingMs: Only for `serverVad` mode. Amount of audio to include before speech starts (in milliseconds).
153
+
/// - Parameter silenceDurationMs: Only for `serverVad` mode. Duration of silence to detect speech stop (in milliseconds).
154
+
/// - Parameter threshold: Only for `serverVad` mode. Activation threshold for VAD (0.0 to 1.0).
/// Creates a new `TurnDetection` configuration for Server VAD.
168
+
///
169
+
/// - Parameter createResponse: Whether or not to automatically generate a response when a VAD stop event occurs.
170
+
/// - Parameter idleTimeout: Optional idle timeout after which turn detection will auto-timeout when no additional audio is received.
171
+
/// - Parameter interruptResponse: Whether or not to automatically interrupt any ongoing response with output to the default conversation when a VAD start event occurs.
172
+
/// - Parameter prefixPaddingMs: Amount of audio to include before speech starts (in milliseconds).
173
+
/// - Parameter silenceDurationMs: Duration of silence to detect speech stop (in milliseconds).
174
+
/// - Parameter threshold: Activation threshold for VAD (0.0 to 1.0).
/// Creates a new `TurnDetection` configuration for Semantic VAD.
180
+
///
181
+
/// - Parameter createResponse: Whether or not to automatically generate a response when a VAD stop event occurs.
182
+
/// - Parameter eagerness: The eagerness of the model to respond.
183
+
/// - Parameter idleTimeout: Optional idle timeout after which turn detection will auto-timeout when no additional audio is received.
184
+
/// - Parameter interruptResponse: Whether or not to automatically interrupt any ongoing response with output to the default conversation when a VAD start event occurs.
/// Configuration for input audio noise reduction.
194
+
///
195
+
/// Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
196
+
///
197
+
/// Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
198
+
publicvarnoiseReduction:NoiseReduction?
199
+
200
+
/// Configuration for input audio transcription.
201
+
///
202
+
/// Input audio transcription is not native to the model, since the model consumes audio directly.
203
+
///
204
+
/// Transcription runs asynchronously through [the `/audio/transcriptions` endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription) and should be treated as guidance of input audio content rather than precisely what the model heard.
205
+
///
206
+
/// The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.
152
207
publicvartranscription:Transcription?
208
+
209
+
/// Configuration for turn detection, either Server VAD or Semantic VAD.
210
+
///
211
+
/// Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.
212
+
///
213
+
/// Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability.
214
+
///
215
+
/// For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking.
216
+
///
217
+
/// This can be useful for more natural conversations, but may have a higher latency.
0 commit comments