aboutsummaryrefslogtreecommitdiff
path: root/audiobook.py
diff options
context:
space:
mode:
authorhistoria <historiavg@proton.me>2026-08-24 13:50:50 -0400
committerhistoria <historiavg@proton.me>2026-08-24 13:50:50 -0400
commitdff790664389d60d16729092a58d9c0dc490a953 (patch)
tree7c29996d78b0c1ae82fa9c4dc71ed39bb70d180e /audiobook.py
parentaac8febbdb45b7994e209bc74a44f8fc98fc745d (diff)
downloadtts-audiobook-generator-dff790664389d60d16729092a58d9c0dc490a953.tar.gz
remove: --chunk flag (always force client-side chunking)
Diffstat (limited to 'audiobook.py')
-rwxr-xr-xaudiobook.py23
1 files changed, 3 insertions, 20 deletions
diff --git a/audiobook.py b/audiobook.py
index 2eeabfe..1cc1085 100755
--- a/audiobook.py
+++ b/audiobook.py
@@ -55,7 +55,7 @@ from converter.tts import (
def convert(backend: str = None, voice: str = None, clone: str = None,
transcription: str = None, no_transcription: bool = False,
language: str = None, speed: float = 1.0, single_file: bool = False,
- output_format: str = None, debug: bool = False, chunk: bool = False,
+ output_format: str = None, debug: bool = False,
model_id: str = None, instructions: str = None,
request_options: dict = None, input_dir: Path = None,
output_dir: Path = None) -> int:
@@ -104,7 +104,7 @@ def convert(backend: str = None, voice: str = None, clone: str = None,
skip_transcription=no_transcription, speed=speed,
single_file=single_file, output_format=output_format,
language=language, backend=backend, voice=voice, debug=debug,
- chunk=chunk, model_id=model_id, instructions=instructions,
+ model_id=model_id, instructions=instructions,
request_options=request_options,
)
converter._book_files = book_files
@@ -241,14 +241,6 @@ Examples:
"and log every TTS request and response to the console and log file.")
)
parser.add_argument(
- "--chunk", action="store_true",
- help=("Force client-side chunking into CHUNK_SIZE-word requests (see "
- "app/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 qwen and faster backends always "
- "chunk.")
- )
- parser.add_argument(
"--model", type=str, default=None, metavar="ID",
help=("audio.cpp server model entry id to use for this run "
"(--backend audiocpp only). Overrides AUDIOCPP_MODEL_ID in "
@@ -287,15 +279,6 @@ Examples:
if args.input is not None and not args.input.is_dir():
parser.error(f"--input: no such directory: {args.input}")
- if args.chunk:
- if args.backend == BACKEND_AUDIOCPP:
- print("[WARNING] --chunk: the audio.cpp server already splits long text "
- "internally (its text_chunk_size); forcing client-side chunking "
- "may cause needless double-chunking")
- else:
- print(f"[INFO] --chunk has no effect with --backend {args.backend}: "
- "that backend always chunks")
-
if args.backend == BACKEND_FASTER:
if args.clone:
print("[WARNING] --clone is ignored with --backend faster: that backend "
@@ -367,7 +350,7 @@ Examples:
backend=args.backend, voice=args.voice, clone=args.clone,
transcription=args.transcription, no_transcription=args.no_transcription,
language=args.language, speed=args.speed, single_file=args.single_file,
- output_format=args.format, debug=args.debug, chunk=args.chunk,
+ output_format=args.format, debug=args.debug,
model_id=args.model, instructions=args.instructions,
request_options=request_options,
input_dir=args.input, output_dir=args.output,