Tiny PowerShell example for chatting with the xAI Voice Agent API and hearing the reply as audio.
The script:
- opens one realtime WebSocket
- sends your typed messages as chat turns
- receives the assistant transcript and audio chunks
- writes the reply to a temp WAV file