silero v5

This commit is contained in:
2026-01-07 17:31:22 +03:00
parent ebaed3fbbe
commit 7b79593cad
5 changed files with 183 additions and 87 deletions

View File

@@ -250,6 +250,9 @@ def clean_response(text: str) -> str:
# Remove HTML tags if any
text = re.sub(r'<[^>]+>', '', text)
# Remove informal slang greetings at the beginning of sentences/responses
text = re.sub(r'^(Эй|Хэй|Слушай|Так|Ну|Короче|В\s+общем)[,!?:]?\s*', '', text, flags=re.IGNORECASE | re.MULTILINE)
# Convert numbers to words (Russian)
text = numbers_to_words(text)