Feature: Redaction

Last updated 05/06/2021
BATCH
STREAM

Deepgram’s Redaction feature redacts sensitive information, replacing redacted content with asterisks (*). For example, if you chose to redact social security numbers, "My social security number is five five five two two one one one one" would appear in your transcript as "My social security number is *".

Use Cases

Some examples of use cases for redaction include:

  • Customers who handle sensitive customer information, including social security numbers or credit card information, and need to ensure this data isn’t stored for security and compliance purposes.

Enable Feature

To enable redaction, when you call Deepgram’s API, add a redact parameter in the query string and set it to the type of information you would like to redact:

redact=<option>

Possible options include:

  • pci: Redacts sensitive credit card information, including credit card number, expiration date, and CVV
  • numbers (or true): Aggressively redacts strings of numerals
  • ssn (beta): Redacts social security numbers

To transcribe audio from a file on your computer, run the following curl command in a terminal or your favorite API client. Be sure to swap the placeholder username and password with the email address you used to create your Deepgram account and your Deepgram password.

curl
-X POST
-u USERNAME:PASSWORD
-H "Content-Type: audio/wav"
--data-binary @myaudio.wav
"https://brain.deepgram.com/v2/listen?redact=<option>"

To use options that are in beta, you must submit requests to https://beta.deepgram.com/v2/listen.

Results

Once applied, results will appear in the transcript.

redact=pci

TruthBefore redactAfter redact
my credit card number is four four four four nine nine nine nine three three three three two two two two with an expiration date of one twenty three and the cvv code is one one one i live at one two three main street dallas texas seven five two zero one my phone number is five five five two one two nine three three three my date of birth is july twelfth nineteen seventy sixmy credit card number is four four four four nine nine nine nine three three three three two two two two with an expiration date of one twenty three and the cvv code is one one one i live at one two three main street dallas texas seven five two zero one my phone number is five five five two one two nine three three three my date of birth is july twelfth nineteen seventy sixmy credit card number is * with an expiration date of * and the cvv code is * i live at * main street dallas texas * my phone number is five five five two one two nine three three three my date of birth is july twelfth nineteen seventy six

redact=numbers

TruthBefore redactAfter redact
my credit card number is four four four four nine nine nine nine three three three three two two two two with an expiration date of one twenty three and the cvv code is one one one i live at one two three main street dallas texas seven five two zero one my phone number is five five five two one two nine three three three my date of birth is july twelfth nineteen seventy sixmy credit card number is four four four four nine nine nine nine three three three three two two two two with an expiration date of one twenty three and the cvv code is one one one i live at one two three main street dallas texas seven five two zero one my phone number is five five five two one two nine three three three my date of birth is july twelfth nineteen seventy sixmy credit card number is * with an expiration date of * and the cvv code is * i live at * street dallas texas * my phone number is * my date of birth is july twelfth *

redact=ssn

TruthBefore redactAfter redact
my credit card number is five five five five one one one one two two two two three four three four it expires july two thousand seven the code is three three three my phone number is five five five two one two three four three four i was born on seven twelve seventy six my social security number is three three three two two four four four four and i live at one two three four main street dallas texas seven five o two onemy credit card number is five five five five one one one one two two two two three four three four it expires july two thousand seven the code is three three three my phone number is five five five two one two three four three four i was born on seven twelve seventy six my social security number is three three three two two four four four four and i live at one two three four main street dallas texas seven five o two onemy credit card number is five five five five one one one one two two two two three four three four it expires july two thousand seven the code is three three three my phone number is five five five two one two three four three four i was born on seven twelve seventy six my social security number is * and i live at one two three four main street dallas texas seven five o two one

You can send multiple values in the query string:

redact=pci&redact=numbers

TruthBefore redactAfter redact
my credit card number is four four four four nine nine nine nine three three three three two two two two with an expiration date of one twenty three and the cvv code is one one one i live at one two three main street dallas texas seven five two zero one my phone number is five five five two one two nine three three three my date of birth is july twelfth nineteen seventy ninemy credit card number is four four four four nine nine nine nine three three three three two two two two with an expiration date of one twenty three and the cvv code is one one one i live at one two three main street dallas texas seven five two zero one my phone number is five five five two one two nine three three three my date of birth is july twelfth nineteen seventy ninemy credit card number is * with an expiration date of * and the cvv code is * i live at * street dallas texas * my phone number is * * my date of birth is july twelfth *

By default, Deepgram applies its general AI model, which is a good, general purpose model for everyday situations. To learn more about the customization possible with Deepgram's API, check out the Speech Recognition API Reference.