fix: use realtimeInput.text for intro prompt, handle Blob WebSocket data
Some checks failed
Build & Push / build-and-push (push) Has been cancelled

- Introduction prompt uses realtimeInput.text format (not clientContent)
- Agent now successfully introduces itself and sends audio responses
- Playback AudioContext created in user gesture for mobile

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-28 14:40:08 +01:00
parent 6fcebe74af
commit 015ae49d2d

View File

@@ -339,9 +339,8 @@ export default function VoiceAgentProvider({ locale, children }: VoiceAgentProvi
trackAmplitude(); trackAmplitude();
// Prompt the agent to introduce itself // Prompt the agent to introduce itself
ws.send(JSON.stringify({ ws.send(JSON.stringify({
clientContent: { realtimeInput: {
turns: [{ role: 'user', parts: [{ text: 'Hello, please introduce yourself.' }] }], text: 'Hello, please introduce yourself.',
turnComplete: true,
}, },
})); }));
return; return;