diff options
| author | historia <historiavg@proton.me> | 2026-08-17 19:19:40 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-17 19:19:40 -0400 |
| commit | b80fa9db6bab6cdb2856874b606a93149cfc1af2 (patch) | |
| tree | 7404d8f0592ad225cd2074e81f3920d1a498dfe1 /README.md | |
| parent | 0ad594aa6497c4d41272e503f33fde2103b96cd6 (diff) | |
| download | tts-audiobook-generator-b80fa9db6bab6cdb2856874b606a93149cfc1af2.tar.gz | |
feat(converter): add per-chapter and m4b output
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 30 |
1 files changed, 28 insertions, 2 deletions
@@ -10,7 +10,7 @@ Original project: [https://github.com/WhiskeyCoder/Qwen3-Audiobook-Converter](ht The converter sends text extracted from your books to a locally running Qwen3-TTS server and assembles the returned audio into a single audiobook file. - Supported input: `.txt`, `.pdf`, `.epub` -- Output: `.mp3` +- Output: `.mp3` or `.m4b` - Two voice modes: - Custom voice: pre-built speakers - Voice clone: clone a voice from a `.wav` reference audio file @@ -67,7 +67,7 @@ qwen-tts-demo Qwen/Qwen3-TTS-12Hz-1.7B-Base --ip 127.0.0.1 --port 7861 ## Converting books -Put your book files (epub, txt, etc.) in the `book_to_convert/` folder. Then run the script. The output mp3 goes to `audiobooks/`. +Put your book files (epub, txt, etc.) in the `input/` folder. Then run the script. The output goes to `output/`. ### Custom voice @@ -105,6 +105,32 @@ Adjust the speed of the final audiobook without changing pitch (uses ffmpeg `ate python audiobook_converter.py --speed 0.9 ``` +### Output format (mp3 / m4b) + +Use `--format` to choose the output container. The default is `mp3`; `m4b` uses AAC audio (ffmpeg `aac`). + +```bash +python audiobook_converter.py --format m4b +``` + +### Chapters (EPUB) + +Books with chapters (e.g. EPUB) are converted to **one file per chapter** by default. Files are named `output/<Book>_01_<Chapter>.mp3`, `output/<Book>_02_<Chapter>.mp3`, and so on. + +To merge all chapters into a single file instead, pass `--single-file`: + +```bash +python audiobook_converter.py --single-file +``` + +When the source has chapters and the output is a single `m4b`, chapter markers are embedded so listeners can skip between chapters: + +```bash +python audiobook_converter.py --format m4b --single-file +``` + +TXT and PDF files have no chapter structure and always produce a single file. + The `chunks/` folder is scratch space for the current book only — it is emptied before and after every conversion, so an interrupted run never affects the next one. ## Running tests |
