AssemblyAI / profanity-filter-demo

Submit a YouTube video and use AssemblyAI's Profanity Filter to censor profanities.

Home Page:https://m-ods-profanity-filter-demo-profanity-filter-g03xap.streamlit.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

To try it out quickly, use this Streamlit App. You'll need an AssemblyAI API key which you can sign up for here!

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

Submit a YouTube video and use AssemblyAI's Profanity Filter to censor profanities.

https://m-ods-profanity-filter-demo-profanity-filter-g03xap.streamlit.app/


Languages

Language:Python 100.0%