File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
packages/agents-realtime/src Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @openai/agents-realtime ' : patch
3+ ---
4+
5+ support noise reduction argument
Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ export type RealtimeTracingConfig =
3333 }
3434 | 'auto' ;
3535
36+ export type RealtimeInputAudioNoiseReductionConfig = {
37+ type : 'near_field' | 'far_field' ;
38+ } ;
39+
3640export type RealtimeInputAudioTranscriptionConfig = {
3741 language ?: string ;
3842 model ?:
@@ -83,6 +87,7 @@ export type RealtimeSessionConfig = {
8387 tools : FunctionToolDefinition [ ] ;
8488 tracing ?: RealtimeTracingConfig | null ;
8589 providerData ?: Record < string , any > ;
90+ inputAudioNoiseReduction : RealtimeInputAudioNoiseReductionConfig | null ;
8691} ;
8792
8893export type FunctionToolDefinition = {
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ export const DEFAULT_OPENAI_REALTIME_SESSION_CONFIG: Partial<RealtimeSessionConf
6565 turnDetection : {
6666 type : 'semantic_vad' ,
6767 } ,
68+ inputAudioNoiseReduction : null ,
6869 } ;
6970
7071/**
@@ -391,6 +392,9 @@ export abstract class OpenAIRealtimeBase
391392 input_audio_transcription :
392393 config . inputAudioTranscription ??
393394 DEFAULT_OPENAI_REALTIME_SESSION_CONFIG . inputAudioTranscription ,
395+ input_audio_noise_reduction :
396+ config . inputAudioNoiseReduction ??
397+ DEFAULT_OPENAI_REALTIME_SESSION_CONFIG . inputAudioNoiseReduction ,
394398 turn_detection :
395399 OpenAIRealtimeBase . buildTurnDetectionConfig ( config . turnDetection ) ??
396400 DEFAULT_OPENAI_REALTIME_SESSION_CONFIG . turnDetection ,
You can’t perform that action at this time.
0 commit comments