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 (:.?!;)
|
- statements ending in punctuations (:.?!;)
|
||||||
- list items starting in '-' or '*'
|
- list items starting in '-' or '*'
|
||||||
- numbered items starting with a digit followed by a dot '.'
|
- 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(
|
generator = pipeline(
|
||||||
text,
|
text,
|
||||||
voice=voice,
|
voice=voice,
|
||||||
split_pattern=r'\n{2,}|[:.?!;]\n+|\n[\*\-(\d+\.)]'
|
split_pattern=sp
|
||||||
)
|
)
|
||||||
|
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
|
|
Loading…
Reference in a new issue