feat(voice): wave_voice_converse — the agent-facing voice-agent tool

Merged
YA
2mo ago
+133-0

Drive a full headless conversation (bind -> audio-in WS -> TTS WS -> PCM out) with no browser/WebRTC. Same transport as the voice CLI. Auth via WAVE_INTERNAL_SECRET + WAVE_REALTIME_EDGE (the edge's internal seal).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


[!NOTE]
High Risk
Uses the edge internal seal (WAVE_INTERNAL_SECRET) rather than customer auth, and reads/writes arbitrary filesystem paths supplied by the tool caller.

Overview
Adds wave_voice_converse so an agent can drive a full headless voice-agent conversation without a browser or WebRTC: bind to a room, stream a WAV of caller speech, and write the agent’s TTS reply as raw PCM.

The tool talks to WAVE_REALTIME_EDGE with WAVE_INTERNAL_SECRET (not the customer API key), matching the existing CLI/harness transport. Input is a 48 kHz 16-bit WAV; output is raw stereo PCM at outPath. Registered in the shared allTools list so stdio and SDK transports stay in parity.

Reviewed by Cursor Bugbot for commit 50b28ccd97841ee264892cf4b66511e609b9b016. Bugbot is set up for automated code reviews on this repo. Configure here.