From ed463c73bf1ea0de5654a93aaaaf628065010623 Mon Sep 17 00:00:00 2001 From: klopez4212 Date: Sun, 5 Jul 2026 09:20:14 +0100 Subject: [PATCH] fix(relay): wrap transcription config in session object The OpenAI client_secrets endpoint expects the body as { session: { type, audio: { input: { transcription, turn_detection } } } } not as top-level fields. Also moves turn_detection under audio.input per the Realtime transcription guide. Signed-off-by: klopez4212 --- crates/buzz-relay/src/api/transcribe.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/crates/buzz-relay/src/api/transcribe.rs b/crates/buzz-relay/src/api/transcribe.rs index 97263a87f..1e83be13e 100644 --- a/crates/buzz-relay/src/api/transcribe.rs +++ b/crates/buzz-relay/src/api/transcribe.rs @@ -81,16 +81,18 @@ pub async fn create_transcribe_session( .header("Authorization", format!("Bearer {api_key}")) .header("Content-Type", "application/json") .json(&serde_json::json!({ - "type": "transcription", - "audio": { - "input": { - "transcription": { - "model": model, + "session": { + "type": "transcription", + "audio": { + "input": { + "transcription": { + "model": model, + }, + "turn_detection": { + "type": "server_vad", + } } } - }, - "turn_detection": { - "type": "server_vad", } })) .timeout(std::time::Duration::from_secs(10))