File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ const OPENAI_REALTIME_ACTIVE_RESPONSE_ERROR_PREFIX =
9393const OPENAI_REALTIME_NO_ACTIVE_RESPONSE_CANCEL_ERROR =
9494 "Cancellation failed: no active response found" ;
9595const OPENAI_REALTIME_MAX_SESSION_DURATION_FRAGMENT = "maximum duration" ;
96+ const OPENAI_VOICE_WS_MAX_PAYLOAD_BYTES = 16 * 1024 * 1024 ;
9697const OPENAI_REALTIME_DEFAULT_MIN_BARGE_IN_AUDIO_END_MS = 250 ;
9798// Realtime validates this character set but accepts names beyond the 64-character
9899// cap used by other OpenAI tool surfaces.
@@ -616,6 +617,7 @@ class OpenAIRealtimeVoiceBridge implements RealtimeVoiceBridge {
616617 const proxyAgent = createDebugProxyWebSocketAgent ( debugProxy ) ;
617618 const ws = new WebSocket ( connection . url , {
618619 headers : connection . headers ,
620+ maxPayload : OPENAI_VOICE_WS_MAX_PAYLOAD_BYTES ,
619621 ...( proxyAgent ? { agent : proxyAgent } : { } ) ,
620622 } ) ;
621623 this . ws = ws ;
You can’t perform that action at this time.
0 commit comments