MCPcopy Create free account
hub / github.com/FireRedTeam/FireRedTTS2 / protect_float

Function protect_float

fireredtts2/utils/spliter.py:122–124  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

120
121
122def protect_float(text):
123 # Turns 3.14 into <3_f_14> to prevent splitting
124 return re.sub(r"(\d+)\.(\d+)", r"<\1_f_\2>", text)
125
126
127def unprotect_float(text):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected