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.
Ask AIPlaygroundLoginFree API Key
HomeAPI ReferenceVoice AgentSpeech-to-TextText-to-SpeechIntelligenceSelf-Hosted Deployments
HomeAPI ReferenceVoice AgentSpeech-to-TextText-to-SpeechIntelligenceSelf-Hosted Deployments
    • Getting Started with Speech to Text
  • Pre-Recorded Audio
    • Getting Started
    • Feature Overview
    • Template Apps
  • Streaming Audio
    • Compare Flux to Nova-3
  • Models and Languages
    • Models & Languages Overview
    • Languages Support
    • Language Detection
    • Multilingual Codeswitching
    • Model Options
    • Version
  • Formatting
    • Speaker Diarization
    • Dictation
    • Filler Words
    • Measurements
    • Numerals
    • Paragraphs
    • Profanity Filtering
    • Punctuation
    • Redaction
    • Smart Formatting
    • Supported Entity Types
    • Utterances
    • Utterance Split
  • Custom Vocabulary
    • Find and Replace
    • Keyterm Prompting
    • Keywords
    • Search
  • Media Input Settings
    • Channels
    • Encoding
    • Multichannel
    • Sample Rate
  • Results Processing
    • Understanding Word Confidence Scores
    • STT Callback
    • STT Tagging
    • Extra Metadata
  • Migrating
    • Migrating From Amazon Web Services (AWS) Transcribe to Deepgram
    • Migrating From Google Speech-to-Text (STT) to Deepgram
    • Migrating From OpenAI Whisper to Deepgram
    • Migrating from AssemblyAI Speech-to-Text to Deepgram
LogoLogo
Ask AIPlaygroundLoginFree API Key
On this page
  • Enable Feature
  • Results
Formatting

Profanity Filtering

Profanity Filter looks for recognized profanity and replaces it with asterisks.
Was this page helpful?
Previous

Punctuation

Punctuation adds punctuation and capitalization to your transcript.
Next
Built with
Deepgram API Playground
Try this feature out in our API Playground.

profanity_filter boolean Default: false

Pre-recorded Streaming:NovaStreaming:Flux Specific languages only

Deepgram’s profanity filtering feature masks offensive language in transcripts using asterisks. Profanity filtering is available for the following languages:

  • Arabic: ar, ar-AE, ar-SA, ar-QA, ar-KW, ar-SY, ar-LB, ar-PS, ar-JO, ar-EG, ar-SD, ar-TD, ar-MA, ar-DZ, ar-TN, ar-IQ, ar-IR
  • Belarusian: be
  • Bengali: bn
  • Bosnian: bs
  • Bulgarian: bg
  • Catalan: ca
  • Chinese: zh, zh-CN, zh-TW
  • Chinese (Cantonese, Traditional): zh-HK
  • Chinese (Mandarin, Simplified): zh, zh-CN, zh-Hans
  • Chinese (Mandarin, Traditional): zh-TW, zh-Hant
  • Croatian: hr
  • Czech: cs
  • Danish: da, da-DK
  • Dutch: nl
  • English: en, en-US, en-AU, en-CA, en-GB, en-IE, en-IN, en-NZ
  • Estonian: et
  • Finnish: fi
  • Flemish: nl-BE
  • French: fr, fr-CA
  • German: de
  • German (Switzerland): de-CH
  • Greek: el
  • Gujarati: gu, gu-IN
  • Hebrew: he
  • Hindi: hi, hi-Latn
  • Hungarian: hu
  • Indonesian: id
  • Italian: it
  • Japanese: ja
  • Kannada: kn
  • Korean: ko, ko-KR
  • Latvian: lv
  • Lithuanian: lt
  • Macedonian: mk
  • Malay: ms
  • Marathi: mr
  • Norwegian: no
  • Persian: fa
  • Polish: pl
  • Portuguese: pt, pt-BR, pt-PT
  • Romanian: ro
  • Russian: ru
  • Serbian: sr
  • Slovak: sk
  • Slovenian: sl
  • Spanish: es, es-419, es-LATAM
  • Swedish: sv, sv-SE
  • Tagalog: tl
  • Tamasheq: taq
  • Tamil: ta
  • Telugu: te
  • Thai: th, th-TH
  • Turkish: tr
  • Ukrainian: uk
  • Urdu: ur
  • Vietnamese: vi

Profanity filtering is supported for all multilingual models: Nova-2 multi, Nova-3 multi, and Flux multi (language=multi).

Enable Feature

To enable Profanity Filtering, use the following parameter in the query string when you call Deepgram’s /listen endpoint :

profanity_filter=true

To transcribe audio from a file on your computer, run the following cURL command in a terminal or your favorite API client.

cURL
$curl \
> --request POST \
> --header 'Authorization: Token YOUR_DEEPGRAM_API_KEY' \
> --header 'Content-Type: audio/wav' \
> --data-binary @youraudio.wav \
> --url 'https://api.deepgram.com/v1/listen?profanity_filter=true'

Replace YOUR_DEEPGRAM_API_KEY with your Deepgram API Key.

Results

Filtered results will appear in the transcript as ****

JSON
1{
2 "metadata": {
3 "transaction_key": "deprecated",
4 "request_id": "9d5be02c-85a6-4e88-839e-474507583c70",
5 "sha256": "36ee5ac2e476126b4a50bc192239ab73e5f9cdd496b0f27c516162447631a105",
6 "created": "2024-12-14T00:07:25.012Z",
7 "duration": 22.013313,
8 "channels": 1,
9 "models": [
10 "1abfe86b-e047-4eed-858a-35e5625b41ee"
11 ],
12 "model_info": {
13 "1abfe86b-e047-4eed-858a-35e5625b41ee": {
14 "name": "2-general-nova",
15 "version": "2024-01-06.5664",
16 "arch": "nova-2"
17 }
18 }
19 },
20 "results": {
21 "channels": [
22 {
23 "alternatives": [
24 {
25 "transcript": "it's a test of profanity filtering **** **** ******* **** you ******* **** *** **** you that's the end of the test",
26 "confidence": 0.9854036,
27 "words": [
28 {
29 "word": "it's",
30 "start": 1.92,
31 "end": 2.1599998,
32 "confidence": 0.94446576
33 },
34 {
35 "word": "a",
36 "start": 2.1599998,
37 "end": 2.32,
38 "confidence": 0.6431149
39 },
40 {
41 "word": "test",
42 "start": 2.32,
43 "end": 2.72,
44 "confidence": 0.9996898
45 },
46 {
47 "word": "of",
48 "start": 2.72,
49 "end": 2.96,
50 "confidence": 0.9829601
51 },
52 {
53 "word": "profanity",
54 "start": 2.96,
55 "end": 3.46,
56 "confidence": 0.99511766
57 },
58 {
59 "word": "filtering",
60 "start": 3.6799998,
61 "end": 4.18,
62 "confidence": 0.9920975
63 },
64 {
65 "word": "****",
66 "start": 5.12,
67 "end": 5.62,
68 "confidence": 0.9255334
69 },
70 {
71 "word": "****",
72 "start": 6.08,
73 "end": 6.58,
74 "confidence": 0.99655294
75 },
76 {
77 "word": "*******",
78 "start": 7.2,
79 "end": 7.7,
80 "confidence": 0.9951559
81 },
82 {
83 "word": "****",
84 "start": 8.32,
85 "end": 8.82,
86 "confidence": 0.627333
87 },
88 {
89 "word": "you",
90 "start": 9.5199995,
91 "end": 10.0199995,
92 "confidence": 0.67789125
93 },
94 {
95 "word": "*******",
96 "start": 11.068313,
97 "end": 11.568313,
98 "confidence": 0.96285325
99 },
100 {
101 "word": "****",
102 "start": 12.428312,
103 "end": 12.928312,
104 "confidence": 0.97373027
105 },
106 {
107 "word": "***",
108 "start": 18.028313,
109 "end": 18.348312,
110 "confidence": 0.8841204
111 },
112 {
113 "word": "****",
114 "start": 18.348312,
115 "end": 18.668312,
116 "confidence": 0.9854036
117 },
118 {
119 "word": "you",
120 "start": 18.668312,
121 "end": 19.168312,
122 "confidence": 0.9957408
123 },
124 {
125 "word": "that's",
126 "start": 19.94831,
127 "end": 20.268312,
128 "confidence": 0.9990535
129 },
130 {
131 "word": "the",
132 "start": 20.268312,
133 "end": 20.348312,
134 "confidence": 0.94378966
135 },
136 {
137 "word": "end",
138 "start": 20.348312,
139 "end": 20.508312,
140 "confidence": 0.9983961
141 },
142 {
143 "word": "of",
144 "start": 20.508312,
145 "end": 20.668312,
146 "confidence": 0.9802233
147 },
148 {
149 "word": "the",
150 "start": 20.668312,
151 "end": 20.748312,
152 "confidence": 0.9961033
153 },
154 {
155 "word": "test",
156 "start": 20.748312,
157 "end": 21.248312,
158 "confidence": 0.9991727
159 }
160 ]
161 }
162 ]
163 }
164 ]
165 }
166}