aboutsummaryrefslogtreecommitdiff
path: root/app/docs/backend-faster.md
diff options
context:
space:
mode:
Diffstat (limited to 'app/docs/backend-faster.md')
-rw-r--r--app/docs/backend-faster.md45
1 files changed, 23 insertions, 22 deletions
diff --git a/app/docs/backend-faster.md b/app/docs/backend-faster.md
index 5de337d..e7bcc8f 100644
--- a/app/docs/backend-faster.md
+++ b/app/docs/backend-faster.md
@@ -1,32 +1,32 @@
-# Backend Option 3: faster-qwen-tts
+# faster-qwen3-tts (`--backend faster`)
-`--backend faster` talks to the OpenAI-compatible server from [faster-qwen3-tts](https://github.com/andimarafioti/faster-qwen3-tts), which uses CUDA graph capture for roughly 5-10x faster inference with the same models. **It requires an NVIDIA GPU**.
+Runs the OpenAI-compatible demo server from [faster-qwen3-tts](https://github.com/andimarafioti/faster-qwen3-tts). The package installs into its own managed venv (`app/envs/faster`), the repo is cloned to `app/faster-qwen3-tts`.
-The easiest way is to run `python audiobook.py` → **Configure Backends… → Install Backend → faster-qwen3-tts** (or `python app/backends/faster.py path/to/clone/wavs`): the TUI pip-installs `faster-qwen3-tts[demo]` into its own managed venv (`app/envs/faster`, separate from the app's venv and from the qwen backend's — both TTS stacks ship conflicting versions of a shared `qwen_tts` module; the faster wheel pulls its own `qwen-tts-hf` build of it automatically), clones the repo, transcribes the `.wav` files with whisper (faster-whisper, installed when wheels exist for your platform — otherwise you type the transcripts), and writes `voices.json` for you — all on one options screen (voices directory, language, whisper model, and what to re-transcribe on a modify run). The server port is not asked: it lives in `FASTER_API_URL` (edit it in **Settings**). You can also start the server from the hub's **Start/Stop Backend Servers** menu, or let a conversion start it automatically.
+Run all commands from the project root (next to `audiobook.py`).
-If you prefer to install the backend yourself (in your own environment, not the managed venv), the manual steps are below. Either way the hub detects a running server by its port, so a manually-installed backend works once its server is up. To use a server on another machine, set `FASTER_REMOTE_URL` in `app/converter/config.py` to its `host:port` (default `127.0.0.1:8000`) — the hub probes it and offers a `faster-qwen3-tts [remote]` entry — or pass `--api-url` on the CLI.
+## Requirements
-Install into your environment (this backend does **not** need the `qwen-tts`
-pip package — the wheel pulls the compatible `qwen-tts-hf` build of the
-`qwen_tts` library automatically, so keep it out of any venv that also has
-upstream `qwen-tts` installed):
+- NVIDIA GPU
+- git
+
+## Install
+
+1. Venv and package:
```bash
-python -m venv audiobook-faster
-source audiobook-faster/bin/activate
-pip install "faster-qwen3-tts[demo]"
+python3 -m venv app/envs/faster
+app/envs/faster/bin/pip install "faster-qwen3-tts[demo]"
```
-**This backend always uses voice cloning**. The reference voice and language are configured on the **server**, not through the converter. The server does not transcribe reference audio itself, so do it manually or use the `backends.faster` setup wizard (see below).
+Do not install upstream `qwen-tts` into this venv — the two ship conflicting `qwen_tts` modules.
-The pip package does not include the server script, so clone the repository (the `backends.faster` wizard does this for you into `./faster-qwen3-tts`):
+2. Clone the repo (the pip package does not include the server script):
```bash
-git clone https://github.com/andimarafioti/faster-qwen3-tts
-cd faster-qwen3-tts
+git clone https://github.com/andimarafioti/faster-qwen3-tts app/faster-qwen3-tts
```
-Create a `voices.json` mapping names to reference configurations (.wav to clone, transcript, language). The TUI setup writes this for you; manually it looks like:
+3. Create a `voices.json` mapping voice names to reference clips:
```json
{
@@ -35,17 +35,18 @@ Create a `voices.json` mapping names to reference configurations (.wav to clone,
}
```
-Run the server
+This backend always clones: every voice is a key in this file, and `ref_text` is the transcript of the clip.
+
+## Run the server
```bash
-python examples/openai_server.py --voices voices.json --port 8000
+app/envs/faster/bin/python app/faster-qwen3-tts/examples/openai_server.py --voices voices.json --port 8000
```
-Then from another terminal, run audiobook.py with `--backend faster`
+## Use it
```bash
-python audiobook.py --backend faster --voice NAME
+python audiobook.py --backend faster --api-url http://127.0.0.1:8000 --voice default
```
-`--voice` is required: NAME must be a key in the server's `voices.json`
-(the server silently falls back to its first configured voice if it is not).
+`--voice` must be a key in the server's `voices.json`.