diff options
| author | historia <historiavg@proton.me> | 2026-08-27 19:00:44 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-27 19:00:44 -0400 |
| commit | 5611f709367677b77a482aa8e396fd3bc6a0ab26 (patch) | |
| tree | c19f8ffa5a199d65ebb2c44ffaa7fc3feff3f078 /README.md | |
| parent | 5ecf7711f3457587a00859b04e239d1d7de3ca2f (diff) | |
| download | tts-audiobook-generator-5611f709367677b77a482aa8e396fd3bc6a0ab26.tar.gz | |
feat: flags for converting individual book files --input-book --output-book
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -58,7 +58,7 @@ python audiobook.py ## CLI Options -Everything the TUI does can also be scripted with flags: `python audiobook.py --backend audiocpp --model higgs --voice narrator`. +Everything the TUI does can also be scripted with flags: `python audiobook.py --backend audiocpp --model higgs --voice narrator`. To convert a single book file instead of the whole input directory, pass `--input-file` (and optionally `--output-file`): `python audiobook.py --input-file books/dune.epub --output-file out/dune.mp3`. The directory flags (`--input`/`--output`) and the single-book flags (`--input-file`/`--output-file`) are mutually exclusive pairs — mixing one stops with an error explaining both. ## Options @@ -68,6 +68,8 @@ Everything the TUI does can also be scripted with flags: `python audiobook.py -- | `--format {mp3,m4b,ogg,flac}` | Output format (default: the `AUDIO_FORMAT` setting in `app/converter/config.py`, `m4b`). | | `--input <dir>` | Directory containing the books to convert (default: the `INPUT_DIR` setting in `app/converter/config.py`, `./input`; relative paths resolve against the project root). | | `--output <dir>` | Directory to write finished audiobooks to (default: the `OUTPUT_DIR` setting in `app/converter/config.py`, `./output`). | +| `--input-file <file>` | Convert one specific book (`.txt`/`.pdf`/`.epub`) instead of scanning a directory; cannot be combined with `--input`. Without `--output-file` the audiobook goes to the output directory under its usual narrator-tagged name. | +| `--output-file <file>` | Base path for the audiobook from `--input-file` (requires it; cannot be combined with `--output`): the file's parent folder receives the audio and its stem is the base output name, without the narrator tag (chapters as `STEM_NN_Title.ext`). The extension must match the output format (`--format` / `AUDIO_FORMAT`) or the run stops without converting. | | `--speed <n>` | Playback speed, pitch-preserving (`1.0` = normal). A normal-speed copy is also output. Defaults to the `SPEED` setting in `app/converter/config.py`. | | `--single-file` | Merge all chapters into a single file. `m4b` is always one file. | | `--language <lang>` | Output language for the synthesized speech. Can add an accent even if the text is English. | |
