mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-07 07:14:52 +08:00
Delete test.py
This commit is contained in:
parent
3fa12a0ad9
commit
f37586f2d7
17
test.py
17
test.py
@ -1,17 +0,0 @@
|
|||||||
import re
|
|
||||||
|
|
||||||
def add_period(text):
|
|
||||||
if not re.search(r'[^\w\s]', text[-1]):
|
|
||||||
text += '。'
|
|
||||||
return text
|
|
||||||
|
|
||||||
def cut5(inp):
|
|
||||||
inp = add_period(inp)
|
|
||||||
inp = inp.strip("\n")
|
|
||||||
punds = r'[、,。?!;:]'
|
|
||||||
items = re.split(f'({punds})', inp)
|
|
||||||
items = ["".join(group) for group in zip(items[::2], items[1::2])]
|
|
||||||
opt = "\n".join(items)
|
|
||||||
return opt
|
|
||||||
|
|
||||||
print(cut5("测试"))
|
|
Loading…
x
Reference in New Issue
Block a user