aboutsummaryrefslogtreecommitdiff
path: root/app/docs/backend-qwen.md
blob: b1e975e9ffffdba8ff11ac4370897df97081f487 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# qwen-tts (`--backend qwen`)

Runs the [qwen-tts](https://pypi.org/project/qwen-tts/) `qwen-tts-demo` server, one model at a time. Installs into its own managed venv, `app/envs/qwen`.

Run all commands from the project root (next to `audiobook.py`).

## Requirements

- Python 3.12+ (as for the app itself)

## Install

```bash
python3 -m venv app/envs/qwen
app/envs/qwen/bin/pip install -U qwen-tts
```

Model weights download from HuggingFace automatically on first server start.

## Run the server

Start the demo matching what you want to do:

```bash
# Built-in speakers (pick a speaker with --voice in TAG)
app/envs/qwen/bin/qwen-tts-demo Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice --ip 127.0.0.1 --port 7860

# Voice cloning (needs a reference clip)
app/envs/qwen/bin/qwen-tts-demo Qwen/Qwen3-TTS-12Hz-1.7B-Base --ip 127.0.0.1 --port 7860

# Voice design (style described with --instructions in TAG)
app/envs/qwen/bin/qwen-tts-demo Qwen/Qwen3-TTS-12Hz-1.7B-VoiceDesign --ip 127.0.0.1 --port 7860
```

- Add `--no-flash-attn` if FlashAttention is not installed.
- For cloning, reference clips of 10-15 seconds of clean speech work best (pass with `--clone <wav>`).

## Use it

```bash
python audiobook.py --backend qwen --api-url http://127.0.0.1:7860
```