From 24cb17a35ebaf5829cefa943c5a528d4accd7dfc Mon Sep 17 00:00:00 2001 From: historia Date: Wed, 19 Aug 2026 02:44:04 -0400 Subject: feat: --debug flag --- audiobook.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'audiobook.py') diff --git a/audiobook.py b/audiobook.py index ed92e53..3c27aac 100755 --- a/audiobook.py +++ b/audiobook.py @@ -119,6 +119,14 @@ Examples: "or 'default' when the server was started with --ref-audio.") ) + parser.add_argument( + "--debug", + action="store_true", + help=("Troubleshooting mode: dump each chunk's raw audio and the exact text " + "sent for it under the debug/ folder (organized per book and chapter), " + "and log every TTS request and response to the console and log file.") + ) + args = parser.parse_args() if args.speed <= 0: @@ -151,7 +159,7 @@ Examples: print("[WARNING] --transcription/--no-transcription " "are ignored without --clone") - setup_logging() + setup_logging(debug=args.debug) setup_directories() try: @@ -167,6 +175,7 @@ Examples: language=args.language, faster=args.faster, faster_voice=args.faster_voice, + debug=args.debug, ) ok = converter.run() except KeyboardInterrupt: -- cgit v1.2.3