MCPcopy Create free account
hub / github.com/FireRedTeam/FireRedTTS / f2b

Function f2b

fireredtts/modules/text_normalizer/utils.py:116–129  ·  view source on GitHub ↗
(ustr, exemption="。,:")

Source from the content-addressed store, hash-verified

114
115
116def f2b(ustr, exemption="。,:"):
117 half = []
118 for u in ustr:
119 num = ord(u)
120 if num == 0x3000:
121 half.append(" ")
122 elif u in exemption: # exemption
123 half.append(u)
124 elif 0xFF01 <= num <= 0xFF5E:
125 num -= 0xFEE0
126 half.append(chr(num))
127 else:
128 half.append(u)
129 return "".join(half)
130
131
132def zh_text_split(text, length=80):

Callers 1

preprocess_textFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected