aboutsummaryrefslogtreecommitdiff
path: root/audiobook.py
diff options
context:
space:
mode:
authorhistoria <historiavg@proton.me>2026-08-21 14:28:42 -0400
committerhistoria <historiavg@proton.me>2026-08-21 14:28:42 -0400
commit9d2c24edb983e458b0fbb9f065fbbda79c19ca26 (patch)
tree8286decf2080bbd61c812dfab5d7dbe1ad1f94d5 /audiobook.py
parente5c722e9fc67f20c1545f79bb4bbc0188dea7d1f (diff)
downloadtts-audiobook-generator-9d2c24edb983e458b0fbb9f065fbbda79c19ca26.tar.gz
rename project tts-audiobook generator, doc cleanup
Diffstat (limited to 'audiobook.py')
-rwxr-xr-xaudiobook.py35
1 files changed, 19 insertions, 16 deletions
diff --git a/audiobook.py b/audiobook.py
index f177268..d3a5426 100755
--- a/audiobook.py
+++ b/audiobook.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""
-Qwen-Based Audiobook Converter
-Converts TXT, PDF and EPUB files into audiobooks using a local Qwen3-TTS server.
+TTS Audiobook Generator
+Converts TXT, PDF and EPUB files into audiobooks using a local TTS server.
Edit converter/config.py to change voice and processing settings.
"""
@@ -28,7 +28,7 @@ from converter.converter import (
from converter.tts import (
BACKEND_AUDIOCPP,
BACKEND_FASTER,
- BACKEND_GRADIO,
+ BACKEND_QWEN,
VOICE_MODE_CLONE,
VOICE_MODE_CUSTOM,
normalize_language,
@@ -38,21 +38,24 @@ from converter.tts import (
def main() -> None:
"""Entry point with argparse."""
parser = argparse.ArgumentParser(
- description="Convert books to audiobooks using the Qwen3-TTS voice model",
+ description="Convert books to audiobooks using a local TTS server",
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog="""
Examples:
- # Use the Qwen Gradio demo with a custom voice (default - Vivian speaker)
+ # Use the default audio.cpp audiocpp_server (speaker mode - Vivian speaker, or a server-side voice)
python audiobook.py
- # Use the Qwen Gradio demo with voice cloning from reference audio
- python audiobook.py --clone path/to/reference.wav
+ # Use the audio.cpp audiocpp_server with a server-side voice preset
+ python audiobook.py --backend audiocpp --voice narrator
+
+ # Use the Qwen demo server with a custom voice
+ python audiobook.py --backend qwen
+
+ # Use the Qwen demo server with voice cloning from reference audio
+ python audiobook.py --backend qwen --clone path/to/reference.wav
# Use the faster-qwen3-tts server (voice cloning, configured server-side)
python audiobook.py --backend faster [--voice NAME]
-
- # Use an audio.cpp audiocpp_server (speaker mode, or a server-side voice)
- python audiobook.py --backend audiocpp [--voice NAME]
"""
)
@@ -117,14 +120,14 @@ Examples:
parser.add_argument(
"--backend",
- choices=[BACKEND_GRADIO, BACKEND_FASTER, BACKEND_AUDIOCPP],
+ choices=[BACKEND_AUDIOCPP, BACKEND_QWEN, BACKEND_FASTER],
default=config.BACKEND,
- help=("TTS server to talk to: the Qwen3-TTS Gradio demos (gradio), the "
+ help=("TTS server to talk to: the Qwen3-TTS demo server (qwen), the "
"faster-qwen3-tts OpenAI-compatible server (faster), or an "
"audio.cpp audiocpp_server (audiocpp) hosting any of its TTS "
"model families — Qwen3-TTS, Higgs Audio, VoxCPM2, IndexTTS2, "
"and more. Defaults to the BACKEND setting in "
- "converter/config.py (gradio).")
+ "converter/config.py (audiocpp).")
)
parser.add_argument(
@@ -137,7 +140,7 @@ Examples:
"with --ref-audio). audiocpp: a voice_preset or voice_dir entry "
"(cloning); required for audio.cpp families without built-in "
"speakers (everything except Qwen3-TTS CustomVoice). Not used by "
- "the gradio backend (use converter/config.py SPEAKER or --clone "
+ "the qwen backend (use converter/config.py SPEAKER or --clone "
"there).")
)
@@ -155,7 +158,7 @@ Examples:
help=("Force client-side chunking into CHUNK_SIZE-word requests (see "
"converter/config.py). Only matters for --backend audiocpp, which "
"otherwise sends each chapter as one request and lets the server "
- "chunk long text itself; the gradio and faster backends always "
+ "chunk long text itself; the qwen and faster backends always "
"chunk.")
)
@@ -223,7 +226,7 @@ Examples:
else:
if args.voice is not None:
parser.error("--voice requires --backend faster or audiocpp; the "
- "gradio backend uses built-in speakers "
+ "qwen backend uses built-in speakers "
"(converter/config.py SPEAKER) or --clone")
if args.language is not None:
try: