# AI use cases for Nari Qwen3 TTS (nari-labs/nari-qwen3-tts)

Repo: [nari-labs/nari-qwen3-tts](https://github.com/nari-labs/nari-qwen3-tts) | Use cases: 4 | Page: https://dedupedai.com/use-cases/nari-labs-nari-qwen3-tts/

Nari Qwen3-TTS is a Python serving implementation of the Qwen3-TTS 1.7B CustomVoice model that exposes HTTP and WebSocket speech generation on a single NVIDIA H100.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Self-host a speech API on an H100 with Docker: https://dedupedai.com/use-cases/nari-labs-nari-qwen3-tts/self-host-speech-api-on-h100/
- Turn a script into a WAV narration file: https://dedupedai.com/use-cases/nari-labs-nari-qwen3-tts/generate-wav-narration-from-text/
- Speak live text as it arrives over WebSocket: https://dedupedai.com/use-cases/nari-labs-nari-qwen3-tts/stream-live-text-to-speech-over-websocket/
- Choose a latency or throughput profile for load: https://dedupedai.com/use-cases/nari-labs-nari-qwen3-tts/pick-latency-or-throughput-profile/

## How to self-host a speech API on an H100 with Docker with Nari Qwen3 TTS

Repo: [nari-labs/nari-qwen3-tts](https://github.com/nari-labs/nari-qwen3-tts) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Run the published container on an H100 and expose an OpenAI-shaped speech endpoint on port 8000.

**Who it is for:** A backend developer whose app needs text-to-speech and who has an NVIDIA H100 host available for self-hosting.

**The problem:** Calling a hosted speech service adds a third party to the request path, and the app needs a local endpoint it controls.

**The outcome:** A running container that answers readiness checks and returns WAV audio for text sent to /v1/audio/speech.

### Steps

1. Confirm the host has an NVIDIA H100, the NVIDIA Container Toolkit, and a CUDA 13.0 compatible driver.
2. Run `docker run --rm --gpus all -p 8000:8000 -e HF_TOKEN -e QWEN3_TTS_PROFILE=ttfa -v nari-qwen3-tts-cache:/home/nari/.cache ghcr.io/nari-labs/nari-qwen3-tts:latest` (inferred, check the README)
3. Wait for model loading and CUDA Graph capture to finish, then run `curl --fail http://127.0.0.1:8000/ready`
4. Send a test request to `http://127.0.0.1:8000/v1/audio/speech` with model set to Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice and a short input.

### Prompt to paste into your agent

```text
In the nari-labs/nari-qwen3-tts repo, start the Docker container on this H100 host using the README run command, then poll `http://127.0.0.1:8000/ready` until it succeeds. Expected output: a ready response and a WAV file from a test request to `/v1/audio/speech`. Verify that the readiness check returns success only after the warm-up request has completed.
```

### Caveat

The README says the container requires an NVIDIA H100 and has been tested only with English as the primary language.

Risk, credentials: The docker command passes HF_TOKEN into the container, so keep the token out of shared shell history and logs.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nari-labs-nari-qwen3-tts/self-host-speech-api-on-h100/

## How to turn a script into a WAV narration file with Nari Qwen3 TTS

Repo: [nari-labs/nari-qwen3-tts](https://github.com/nari-labs/nari-qwen3-tts) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Send text to the speech endpoint with curl and save the returned audio as speech.wav.

**Who it is for:** A content creator or script writer who has a running Nari Qwen3-TTS server and needs a spoken version of a short script.

**The problem:** Recording narration by hand takes time for every script revision.

**The outcome:** A speech.wav file generated from the input text using a preset voice and English language setting.

### Steps

1. Start the server, either with the Docker run command or with `uv run --frozen nari-qwen3-tts-server --profile ttfa`.
2. Check that the server is ready with `curl --fail http://127.0.0.1:8000/ready`.
3. Run `curl http://127.0.0.1:8000/v1/audio/speech -H 'Content-Type: application/json' -d '{"model": "Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice", "input": "Hello from Nari Labs.", "voice": "ryan", "language": "english", "response_format": "wav", "stream": false}' --output speech.wav` (inferred, check the README)
4. Replace the input text with the script and rerun the curl command to produce a new file.

### Prompt to paste into your agent

```text
In the nari-labs/nari-qwen3-tts repo, send the text in <script-file> to the local `/v1/audio/speech` endpoint with response_format set to wav and save the result as speech.wav. Expected output: a playable WAV file that matches the script. Verify that the file exists and that the request used speed 1.0, since the README says that is the only supported speed.
```

### Caveat

The README says the endpoint supports only the listed model, wav and pcm output, and speed 1.0, so other options will not work.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nari-labs-nari-qwen3-tts/generate-wav-narration-from-text/

## How to speak live text as it arrives over WebSocket with Nari Qwen3 TTS

Repo: [nari-labs/nari-qwen3-tts](https://github.com/nari-labs/nari-qwen3-tts) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Stream incremental text to the WebSocket speech endpoint so audio starts before the full sentence exists.

**Who it is for:** An engineer building a voice assistant or live captioning tool that produces text token by token.

**The problem:** Waiting for complete text before generating speech adds delay to every spoken reply.

**The outcome:** A client that sends text increments over WS /v1/audio/speech/ws and plays audio as it is returned.

### Steps

1. Start the server and confirm readiness with `curl --fail http://127.0.0.1:8000/ready`.
2. Open docs/websocket.md in the repo to read the live-text protocol and the client example.
3. Connect a WebSocket client to the `WS /v1/audio/speech/ws` path on the running server.
4. Send text in increments as the source produces it and play back the audio frames as they arrive.

### Prompt to paste into your agent

```text
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.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nari-labs-nari-qwen3-tts/stream-live-text-to-speech-over-websocket/

## How to choose a latency or throughput profile for load with Nari Qwen3 TTS

Repo: [nari-labs/nari-qwen3-tts](https://github.com/nari-labs/nari-qwen3-tts) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Switch between ttfa, balanced, and throughput profiles to match a latency target or a request volume.

**Who it is for:** A platform engineer sizing a speech service that must meet a first-audio latency target or handle heavy batch load on one H100.

**The problem:** One fixed setting cannot favor both fast first audio for interactive users and high aggregate throughput for batch jobs.

**The outcome:** A chosen profile and a repeatable server start command that matches the workload.

### Steps

1. Install the environment with `uv sync --frozen --extra codec --extra cuda --extra serving`.
2. Start the server with a profile: `uv run --frozen nari-qwen3-tts-server --profile ttfa` for latency, or `--profile throughput` for aggregate load. (inferred, check the README)
3. Check readiness with `curl --fail http://127.0.0.1:8000/ready` before sending traffic.
4. Record the time to first audio and the request rate for each profile, then keep the profile that meets the target.

### Prompt to paste into your agent

```text
In the nari-labs/nari-qwen3-tts repo, start the server with the <profile> profile (ttfa, balanced, or throughput) and send a fixed set of test requests to `/v1/audio/speech`. Expected output: a short table of time to first audio and completed requests for each profile tested. Verify that each run started only after `/ready` returned success.
```

### Caveat

The README gives the profile purposes but no numeric targets for each one, so any measured figures must come from the user's own runs on their hardware.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/nari-labs-nari-qwen3-tts/pick-latency-or-throughput-profile/
