feat: update split patterns
This commit is contained in:
parent
cb920badc9
commit
2b034f80c6
1 changed files with 4 additions and 1 deletions
5
tts.py
5
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:
|
||||
|
|
Loading…
Reference in a new issue