Profanity Filter Implementation in STT

We design and deploy artificial intelligence systems: from prototype to production-ready solutions. Our team combines expertise in machine learning, data engineering and MLOps to make AI work not in the lab, but in real business.
Showing 1 of 1 servicesAll 1566 services
Profanity Filter Implementation in STT
Simple
~1 business day
FAQ
AI Development Areas
AI Solution Development Stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_logo-advance_0.png
    B2B Advance company logo design
    561
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822

Implementing Profanity Filtering in STT Profanity filtering in transcriptions is necessary for public platforms, corporate systems, and services working with children. It is implemented at several levels: in the STT engine and/or at the post-processing level. ### Built-in filters for STT providers Google STT:

config = speech.RecognitionConfig(
    profanity_filter=True,  # заменяет нецензурные слова на ***
    language_code="ru-RU"
)
```**AWS Transcribe**:```python
transcribe.start_transcription_job(
    VocabularyFilterName='profanity-filter-ru',
    VocabularyFilterMethod='mask',  # 'mask' | 'remove' | 'tag'
)
```**Azure Speech**:```python
speech_config.set_profanity(speechsdk.ProfanityOption.Masked)
```### Post-processing filter For engines without a built-in filter or for finer control:```python
import re

PROFANITY_LIST_RU = [...]  # список слов в нормализованной форме

def filter_profanity(text: str, replacement: str = "***") -> str:
    """Фильтр с учётом морфологии через нормализацию"""
    import pymorphy3
    morph = pymorphy3.MorphAnalyzer()

    words = text.split()
    result = []
    for word in words:
        # Нормализуем слово (приводим к начальной форме)
        parsed = morph.parse(word)
        normal_form = parsed[0].normal_form if parsed else word.lower()
        if normal_form in PROFANITY_LIST_RU:
            result.append(replacement)
        else:
            result.append(word)
    return " ".join(result)
```Using pymorphy3 is critical for Russian: an obscene word can be in any grammatical form. ### Logging without storage: For auditing without storing content, we log the presence of obscene language and a timestamp without the word itself. Timeframe: 1–2 days.