From 8760626f744d79a05904e692119ffa72fc0c4e54 Mon Sep 17 00:00:00 2001 From: historia Date: Tue, 18 Aug 2026 02:17:03 -0400 Subject: fix(converter): escape ffmetadata titles, thread exact chunk paths --- audiobook_converter.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'audiobook_converter.py') diff --git a/audiobook_converter.py b/audiobook_converter.py index 36bd5c2..82eae9a 100755 --- a/audiobook_converter.py +++ b/audiobook_converter.py @@ -18,11 +18,9 @@ if sys.platform == "win32": sys.stdout.reconfigure(encoding="utf-8") sys.stderr.reconfigure(encoding="utf-8") except AttributeError: - # Python < 3.7 - import codecs - sys.stdout = codecs.getwriter("utf-8")(sys.stdout.buffer, "strict") - sys.stderr = codecs.getwriter("utf-8")(sys.stderr.buffer, "strict") + pass +from converter import config from converter.converter import AudiobookConverter, setup_directories, setup_logging @@ -78,9 +76,9 @@ Examples: parser.add_argument( "--format", - choices=["mp3", "m4b"], - default="mp3", - help="Output container format (default: mp3). m4b uses AAC audio." + choices=list(config.AUDIO_FORMATS), + default=config.AUDIO_FORMAT, + help=f"Output container format (default: {config.AUDIO_FORMAT}). m4b uses AAC audio." ) parser.add_argument( @@ -110,7 +108,7 @@ Examples: try: converter = AudiobookConverter( - voice_mode="voice_clone" if args.voice_clone else "custom_voice", + voice_mode=config.VOICE_MODE_CLONE if args.voice_clone else config.VOICE_MODE_CUSTOM, voice_clone_ref_audio=args.voice_sample if args.voice_clone else None, voice_clone_ref_text=args.voice_sample_text if args.voice_clone else None, skip_transcription=args.no_transcription, -- cgit v1.2.3