This Python script censors specific words in the audio of a video file by replacing them with a beep sound.
- Uses Whisper for speech recognition to identify words in the video.
- Replaces specific words in the audio with a beep sound.
- Outputs a new video file with censored audio.
- Python 3.7 or higher
- ffmpeg
- Whisper
- pydub
-
Clone the repository:
git clone https://github.com/yourusername/your-repo-name.git cd your-repo-name -
Install the dependencies
pip install -r requirements.txt
-
Ensure
ffmpegis installed on your system. You can install it using:- On Ubuntu/Debian:
sudo apt-get install ffmpeg - On macOs:
brew install ffmpeg - On Windows: Download it from FFMPEG's official site
- On Ubuntu/Debian:
Run the script by passing the path to the input video file:
python filter_censor.py input_video.mp4The output will be a new video file with _edited append to the original file name.
This project is licensed under the MIT license