MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / process_text

Function process_text

subprojects/llama.cpp/tools/tts/tts-outetts.py:122–127  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

120
121
122def process_text(text: str):
123 text = re.sub(r'\d+(\.\d+)?', lambda x: x.group(), text.lower()) # TODO this needs to be fixed
124 text = re.sub(r'[-_/,\.\\]', ' ', text)
125 text = re.sub(r'[^a-z\s]', '', text)
126 text = re.sub(r'\s+', ' ', text).strip()
127 return text.split()
128
129# usage:
130# python tts-outetts.py http://server-llm:port http://server-dec:port "text"

Callers 1

tts-outetts.pyFile · 0.70

Calls 3

splitMethod · 0.65
groupMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected