silero v5
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user