From 142b4f64573111876290e5be698a299fbc679304 Mon Sep 17 00:00:00 2001 From: rany2 Date: Fri, 18 Nov 2022 13:14:27 +0200 Subject: [PATCH] Fix #23 --- setup.cfg | 2 +- src/edge_tts/util.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index a6b48ff..8e8cd4f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = edge-tts -version = 5.0.6 +version = 5.0.7 author = rany author_email = ranygh@riseup.net description = Microsoft Edge's TTS diff --git a/src/edge_tts/util.py b/src/edge_tts/util.py index 5581908..6a4a29f 100644 --- a/src/edge_tts/util.py +++ b/src/edge_tts/util.py @@ -120,7 +120,7 @@ async def _main(): ) parser.add_argument( "--write-subtitles", - help="instead of stderr, send subtitle output to provided file", + help="instead of stderr, send subtitle output to provided file (implies boundary-type is 1)", ) parser.add_argument( "--proxy", @@ -132,6 +132,9 @@ async def _main(): await _list_voices(args.proxy) sys.exit(0) + if args.write_subtitles and args.boundary_type == 0: + args.boundary_type = 1 + if args.text is not None or args.file is not None: if args.file is not None: # we need to use sys.stdin.read() because some devices