This page describes how to use Cloud Speech-to-Text to automatically detect profane words in your audio data and censor them in the transcript.
You can enable the profanity filter by setting profanityFilter=true
in
the RecognitionConfig
.
If enabled, Cloud Speech-to-Text will attempt to detect profane words and return
only the first letter followed by asterisks in the transcript (for example,
f***). If this field is set to false
or not set, Cloud Speech-to-Text will
not attempt to filter profanities.
The following sample demonstrates how to enable the profanity filter to recognize audio stored in a Cloud Storage bucket.
Java
To learn how to install and use the client library for Cloud STT, see Cloud STT client libraries . For more information, see the Cloud STT Java API reference documentation .
To authenticate to Cloud STT, set up Application Default Credentials. For more information, see Set up authentication for a local development environment .
Node.js
To learn how to install and use the client library for Cloud STT, see Cloud STT client libraries . For more information, see the Cloud STT Node.js API reference documentation .
To authenticate to Cloud STT, set up Application Default Credentials. For more information, see Set up authentication for a local development environment .
Python
To learn how to install and use the client library for Cloud STT, see Cloud STT client libraries . For more information, see the Cloud STT Python API reference documentation .
To authenticate to Cloud STT, set up Application Default Credentials. For more information, see Set up authentication for a local development environment .

