Redaction

PRE-RECORDED
STREAMING

Deepgram’s Redaction feature redacts sensitive information.

This feature is available for English only (all available regions).

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 replace the placeholder YOUR_DEEPGRAM_API_KEY with your Deepgram API Key. You can create an API Key in the Deepgram Console.

curl

Results

Returned results for redaction differ depending on the type of transcript you are requesting.

Pre-recorded Audio

For pre-recorded audio, redaction replaces redacted content with the type of entity redacted and the number of times that entity has been detected in the transcript. For example, if you choose to redact social security numbers, the phrase “My social security number is five five five two two one one one one and his is six six six two two one three three three” would appear in your transcript as “My social security number is [SSN_1] and his is [SSN_2]“.

Live Streaming Audio

For streaming audio, redaction replaces redacted content with asterisks (*). For example, if you choose to redact social security numbers, the phrase “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 *“.

Sample results are shown below using the streaming redaction syntax (*).

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

When you send multiple values, redaction runs in the order you specify. For instance, in this example, Deepgram will redact all sensitive credit card information first, then all strings of numerals.

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 Deepgram API Reference.

Share your feedback

Thank you! Can you tell us what you liked about it? (Optional)

Thank you. What could we have done better? (Optional)

We may also want to contact you with updates or questions related to your feedback and our product. If don't mind, you can optionally leave your email address along with your comments.

Thank you!

We appreciate your response.