For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
PlaygroundChangelogSign In
OverviewAPI ReferencePre-recorded STTStreaming STTVoice AgentsSpeech UnderstandingGuardrailsLLM GatewayFAQ
OverviewAPI ReferencePre-recorded STTStreaming STTVoice AgentsSpeech UnderstandingGuardrailsLLM GatewayFAQ
  • Models & features
    • Getting started
    • Redact PII from transcripts
    • Detect sensitive content
    • Filter profanity from transcripts
    • Set minimum speech threshold
LogoLogo
PlaygroundChangelogSign In
Models & features

Profanity Filtering

Was this page helpful?
Previous

Speech Threshold

Next
Built with
Streaming profanity filtering

For real-time profanity filtering on streaming transcripts, see Filter profanity.

Supported languages
Global Englishen
Australian Englishen_au
British Englishen_uk
US Englishen_us
Spanishes
Frenchfr
Germande
Italianit
Portuguesept
Dutchnl
Hindihi
Japaneseja

Supported models
Universal-3 Prouniversal-3-pro
Universal-2universal-2

Supported regions

US & EU

You can automatically filter out profanity from the transcripts by setting filter_profanity to true in your transcription config.

Any profanity in the returned text will be replaced with asterisks.

1import assemblyai as aai
2
3aai.settings.api_key = "<YOUR_API_KEY>"
4
5# audio_file = "./local_file.mp3"
6audio_file = "https://assembly.ai/wildfires.mp3"
7
8config = aai.TranscriptionConfig(
9 speech_models=["universal-3-pro", "universal-2"],
10 language_detection=True,
11 filter_profanity=True
12)
13
14transcript = aai.Transcriber(config=config).transcribe(audio_file)
15
16if transcript.status == "error":
17 raise RuntimeError(f"Transcription failed: {transcript.error}")
18
19print(transcript.text)

Profanity filter isn’t perfect. Certain words may still be missed or improperly filtered.