fix sentence boundary

This commit is contained in:
rany
2022-03-01 21:42:01 +02:00
parent 43ee535752
commit 16d5dc273c
5 changed files with 112 additions and 52 deletions

View File

@@ -32,8 +32,7 @@ async def _tts(args):
media_file = open(args.write_media, "wb") # pylint: disable=consider-using-with
async for i in tts.run(
args.text,
args.enable_sentence_boundary,
args.enable_word_boundary,
args.boundary_type,
args.codec,
args.voice,
args.pitch,
@@ -108,18 +107,6 @@ async def _main():
help="set TTS volume. Default +0%%. For more info check https://bit.ly/3eAE5Nx",
default="+0%",
)
parser.add_argument(
"-s",
"--enable-sentence-boundary",
help="enable sentence boundary",
action="store_true",
)
parser.add_argument(
"-w",
"--enable-word-boundary",
help="enable word boundary",
action="store_true",
)
parser.add_argument(
"-O",
"--overlapping",
@@ -127,6 +114,13 @@ async def _main():
default=5,
type=float,
)
parser.add_argument(
"-b",
"--boundary-type",
help="set boundary type for subtitles. Default 0 for none. Set 1 for word_boundary, 2 for sentence_boundary",
default=0,
type=int,
)
parser.add_argument(
"--write-media", help="instead of stdout, send media output to provided file"
)