Spaces:
Running
Running
Commit ·
30a374c
1
Parent(s): 6f91e75
Strip Markdown list markers before TTS
Browse files- tts_processor.py +2 -0
tts_processor.py
CHANGED
|
@@ -415,6 +415,8 @@ def tech_humanize(text):
|
|
| 415 |
|
| 416 |
# Main preprocessing pipeline
|
| 417 |
def preprocess_all(string):
|
|
|
|
|
|
|
| 418 |
string = normalize_dates(string)
|
| 419 |
string = replace_invalid_chars(string)
|
| 420 |
string = replace_numbers(string)
|
|
|
|
| 415 |
|
| 416 |
# Main preprocessing pipeline
|
| 417 |
def preprocess_all(string):
|
| 418 |
+
# LLM responses often arrive as one Markdown list item per TTS request.
|
| 419 |
+
string = re.sub(r"(?m)^\s{0,3}[-*+]\s+", "", string)
|
| 420 |
string = normalize_dates(string)
|
| 421 |
string = replace_invalid_chars(string)
|
| 422 |
string = replace_numbers(string)
|