Skip to content

m-ods/profanity-filter-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to Detect and Censor Profanities

This is an example of how you can use AssemblyAI's Profanity Filter feature to automatically detect profanities and replace them in your audio file.

Quick Setup

  • Download project files by running git clone https://github.com/AssemblyAI/profanity-filter-demo.git
  • Navigate to the project folder
  • Create a new virtual environment
  • Activate the new virtual environment and run pip install -r requirements.txt to install project dependencies
  • Run the application using the streamlit run profanity_filter.py

How it Works

The YouTube video from the link you submitted is downloaded and then uploaded to AssemblyAI's servers for transcription with filter_profanity set to true. When the transcript is complete, a regex search for all words that start with a letter followed by asterisks identifies the timestamps in the original audio with profanity. The original audio is removed and replaced with the censor of the user's choice.

Main Dependencies

  • Streamlit The fastest way to build data apps in Python
  • youtube_dl Command-line program to download videos from YouTube.com
  • pydub Manipulate audio with an simple and easy high level interface.

Contact Us

If you have any questions, please feel free to reach out to our Support team - support@assemblyai.com!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages