Bleepy is a Python program that can block Tagalog and English profanity in audio and videos.
git clone ...
this repocd ...
into this repomkdir -p data/input
cp <path-to-your-video-file> data/input/video.mov
cp <path-to-your-bleep-audio-file-that-will-overwrite-the-audio-of-detected-profanity> data/input/bleep.mp3
docker compose up
docker compose down
when it completes
The following are the Python modules and software that are needed to run this program.
Note: FFMPEG is also needed to be installed to run this program.
-
vosk-api
- Offline speech recognition
- https://pypi.org/project/vosk/
- https://github.com/alphacep/vosk-api
- Language Model: https://alphacephei.com/vosk/models
-
bleepy-profanity-check
- Profanity checker in string that uses machine learning
- https://pypi.org/project/bleepy-profanity-check/
- https://github.com/reyniel26/bleepy-profanity-check
-
Clone this repository.
-
Install Python 3.
- Download here
- Python version 3.9 or above
- Create a virtual environment by running
python -m venv venv
- Activate the virtual environment by running .\venv\Scripts\Activate.ps1
- Check if you have the right python version: python --version should output 3.9.0 or higher
-
Install FFMPEG.
- Easy Installation tutorial for FFMPEG
- If you install VLC Media Player, you already have FFMPEG
-
Install Packages. You can easily install packages by running
python -m pip install -r requirements.txt
- Install vosk.
pip install vosk
- pip for vosk
- Documentation
- Tutorial to use vosk
- Install bleepy-profanity-check.
pip install bleepy-profanity-check
- pip for bleepy-profanity-check
- Documentation
- Install vosk.
-
Set up the language model (follow the instructions).
- Download the language model for vosk from models page. My suggested model is vosk-model-en-us-aspire-0.2.
- Paste it inside bleepy directory or folder. Make sure the file is inside the bleepy folder.
- Extract it.
- Rename it to model.
-
Try to run test_bleepy.py.
pip install pylint
pip install pytest
pylint bleepy
set PATH=%PATH%;<somepathhere>\ffmpeg\bin
E.g. set PATH=%PATH%;C:\Users\Username\ffmpeg\bin