aboutsummaryrefslogtreecommitdiff
path: root/audiobook_converter.py
diff options
context:
space:
mode:
Diffstat (limited to 'audiobook_converter.py')
-rw-r--r--audiobook_converter.py16
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: