Who it is forAn engineer building a voice assistant or live captioning tool that produces text token by token.
The problemWaiting for complete text before generating speech adds delay to every spoken reply.
The outcomeA client that sends text increments over WS /v1/audio/speech/ws and plays audio as it is returned.
What you need first
- A Linux x86_64 host with an NVIDIA H100 GPU
- NVIDIA Container Toolkit and a driver compatible with CUDA 13.0 (for Docker)
- Docker, or uv with Python and the system packages build-essential, libsndfile1, and sox
- A Hugging Face token (HF_TOKEN) if the model files need to be downloaded
Steps
- Start the server and confirm readiness with
curl --fail http://127.0.0.1:8000/ready. - Open docs/websocket.md in the repo to read the live-text protocol and the client example.
- Connect a WebSocket client to the
WS /v1/audio/speech/wspath on the running server. - Send text in increments as the source produces it and play back the audio frames as they arrive.
Prompt for your agent
In the nari-labs/nari-qwen3-tts repo, read docs/websocket.md and write a client that connects to ws://127.0.0.1:8000/v1/audio/speech/ws and sends the text from <text-source> in increments. Expected output: audio chunks received while text is still being sent. Verify that the client handles the protocol described in the docs without guessing message formats.
Caveat. The README names the WebSocket path but leaves the message format to docs/websocket.md, so the client must follow that document.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for nari-labs/nari-qwen3-tts and "Speak live text as it arrives over WebSocket"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer