From b80fa9db6bab6cdb2856874b606a93149cfc1af2 Mon Sep 17 00:00:00 2001 From: historia Date: Mon, 17 Aug 2026 19:19:40 -0400 Subject: feat(converter): add per-chapter and m4b output --- audiobook_converter.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'audiobook_converter.py') diff --git a/audiobook_converter.py b/audiobook_converter.py index d2e7f41..783a3ce 100644 --- a/audiobook_converter.py +++ b/audiobook_converter.py @@ -76,6 +76,20 @@ Examples: help="Playback speed factor for the final audiobook (1.0 = normal). Pitch-preserving." ) + parser.add_argument( + "--format", + choices=["mp3", "m4b"], + default="mp3", + help="Output container format (default: mp3). m4b uses AAC audio." + ) + + parser.add_argument( + "--single-file", + action="store_true", + help=("Combine all chapters into a single output file. By default books with " + "chapters (e.g. EPUB) are converted to one file per chapter.") + ) + args = parser.parse_args() if args.speed <= 0: @@ -100,6 +114,8 @@ Examples: voice_clone_ref_text=args.voice_sample_text if args.voice_clone else None, skip_transcription=args.no_transcription, speed=args.speed, + single_file=args.single_file, + output_format=args.format, ) ok = converter.run() except KeyboardInterrupt: -- cgit v1.2.3