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 /audiobook_converter.py | |
| parent | 0ad594aa6497c4d41272e503f33fde2103b96cd6 (diff) | |
| download | tts-audiobook-generator-b80fa9db6bab6cdb2856874b606a93149cfc1af2.tar.gz | |
feat(converter): add per-chapter and m4b output
Diffstat (limited to 'audiobook_converter.py')
| -rw-r--r-- | audiobook_converter.py | 16 |
1 files changed, 16 insertions, 0 deletions
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: |
