From 2b034f80c6282234b9d5a958bf81d8549fcc2440 Mon Sep 17 00:00:00 2001 From: Ayo Date: Sat, 6 Sep 2025 10:59:10 +0200 Subject: [PATCH] feat: update split patterns --- tts.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tts.py b/tts.py index 557d9d5..280ef17 100644 --- a/tts.py +++ b/tts.py @@ -176,11 +176,14 @@ def main(): - statements ending in punctuations (:.?!;) - list items starting in '-' or '*' - numbered items starting with a digit followed by a dot '.' + - if a new line starts with a capital letter ''' + sp = r'\n{2,}|[:.?!;]\n+|\n[(\* )(\- )(\d\. )]|\n[A-Z]' + generator = pipeline( text, voice=voice, - split_pattern=r'\n{2,}|[:.?!;]\n+|\n[\*\-(\d+\.)]' + split_pattern=sp ) if args.verbose: