Open
Description
Please read this first
- Have you read the docs? Agents SDK docs
- yes
- Have you searched for related issues? Others may have had similar requests
- yes
Question
Hi i don't know if i doing this wrong or it a bug in the SDK but i can not disable the VAD in the realtime session here my code
let data = // fetch token is a simple Laravel HTTP request
const agent = new RealtimeAgent({
name: 'Thoughtbot',
instructions: this.instructions(),
tools: [this.playVideoTool(), this.navigationTool(), this.confirmNavigation(), this.getContext(), this.getUserInfo()],
voice: 'alloy',
});
session = new RealtimeSession(agent, {
config: {
turnDetection: {
type: "server_vad",
threshold: 0.5,
prefixPaddingMs: 300,
silenceDurationMs: 500,
interruptResponse: false,
createResponse: false
}
}
});
await session.connect({
apiKey: data.client_secret.value
});
Error I get
WebRTC: ICE failed, add a STUN server and see about:webrtc for more details
HTTP request to get token
$response = Http::withHeaders([
'Authorization' => 'Bearer '.config('services.openai.api_key'),
'Content-Type' => 'application/json',
])->post('https://api.openai.com/v1/realtime/sessions', [
'turn_detection' => [
"type" => "server_vad",
"threshold" => 0.5,
"prefix_padding_ms" => 300,
"silence_duration_ms" => 500,
'interrupt_response' => false,
'create_response' => false
]
]);