From e7a3d65f68659d17f37b79e8bfefea19d7ac0648 Mon Sep 17 00:00:00 2001 From: historia Date: Mon, 24 Aug 2026 14:13:06 -0400 Subject: feat: audio.cpp unloads model before converting --- README.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 9a535d6..56e5b85 100644 --- a/README.md +++ b/README.md @@ -20,19 +20,23 @@ The converter sends text extracted from your books to a locally running TTS serv ## Quick Start +Download the project + ```bash git clone https://git.historia.vg/git/tts-audiobook-generator cd tts-audiobook-generator -python audiobook.py ``` -On first launch `audiobook.py` creates `app/envs/tts` (via `python -m venv`), -installs `requirements.txt` into it, and re-launches itself inside that -environment. Backend packages (`qwen-tts`, `faster-qwen3-tts[demo]`) are -pip-installed into the same venv by their setup wizards. +- `./input` - Put your book files here +- `./output` - Audio files will output here +- `./voices` - Put .wav files of voices to clone here (10-20 seconds) + +Run `audiobook.py`. It will create a venv `./app/envs/tts` and install all requirements. +``` +python audiobook.py +``` -Put your book files (epub, etc.) in the `input/` directory. The output goes to `output/`. ## Quick start (TUI) @@ -72,10 +76,10 @@ You need one of the following backends (the TUI sets them up for you; manual ste | `--speed ` | Playback speed, pitch-preserving (`1.0` = normal). A normal-speed copy is also output. | | `--single-file` | Merge all chapters into a single file. `m4b` is always one file. | | `--language ` | Output language for the synthesized speech. Can add an accent even if the text is English. | +| `--debug` | Dump each chunk's raw audio and sent text to `debug/` and log every request. | | `--model ` | `audiocpp`: Choose the model from `server.json` | | `--instructions "..."` | `audiocpp`: voice design or style instruction. Required for voice design models (`vdes`) | | `--option KEY=VALUE` | `audiocpp`: Some models support custom options (e.g. `emotion=netural`) that can be passed with this flag | -| `--debug` | Dump each chunk's raw audio and sent text to `debug/` and log every request. | | `--voice ` | `audiocpp`, `faster`: Server-side voice to request | | `--clone ` | `qwen`: Reference audio (`wav`) for voice cloning. | | `--transcription "..."` | `qwen`: Override whisper auto-transcription with manual audio transcript. | @@ -83,20 +87,20 @@ You need one of the following backends (the TUI sets them up for you; manual ste Other options including backend server URLs/ports are configured in `app/converter/config.py` -## TTS Backend Setup +## Manual TTS Backend Setup -Installation and usage documentation for each supported TTS backend is in the `app/docs/` directory: +If the TUI auto-install doesn't work, you may need to set up the backends manually. - [audio.cpp instructions](app/docs/backend-audiocpp.md) - [qwen-tts instructions](app/docs/backend-qwen.md) - [faster-qwen-tts instructions](app/docs/backend-faster.md) +`./audiobook.py` can also connect to external servers running these backends. + ## Tips Transcription affects the output a lot. Whisper does not always give perfect transcription. Manual transcription is better. -If you're cloning one language and outputting another language, `--no-transcription` will remove the accent. Alternatively, setting the "wrong" output `--language` can add an accent. - Even tiny amounts of pause between phrases in the sample audio can have a big impact. Try increasing or decreasing them or find a sample with different cadence. ## License -- cgit v1.2.3