fix: strip emoji from TTS text in clean_for_speech

This commit is contained in:
Cosmo
2026-04-14 15:26:21 +00:00
parent 3301b3559d
commit cd921e1540

View File

@@ -88,6 +88,8 @@ UNIT_SLASH = [
def clean_for_speech(text: str) -> str:
# убрать эмодзи
text = re.sub(r'[𐀀-􏿿☀-➿🌀-🧿]', '', text, flags=re.UNICODE)
text = re.sub(r'\*+', '', text) # убрать **жирный**
text = re.sub(r'#+\s', '', text) # убрать ## заголовки
text = re.sub(r'- ', '', text) # убрать тире списков