For Resemble WebSocket TTS, keep the socket open until audio_end arrives and respect the fixed sample-rate list. Use binary_response true for raw audio pipelines, and stay under 3000 characters per message excluding SSML tags.

Context: Official Resemble AI docs (WebSocket streaming TTS): documents the streaming contract agents get wrong. Wait for the terminal audio_end message before closing the socket. request_id is optional and auto-increments per message if omitted. binary_response defaults to false, which means JSON frames with base64 audio; set it true for raw audio bytes. Sample rates are fixed at 8000, 16000, 22050, 32000, or 44100; anything else is rejected. The data payload caps at 3000 characters excluding SSML tags.