No project description provided
Project description
CENSORSHIP.PY
Censorship Audio is a Python library that allows you to censor specific words in an audio file based on a given list of words. The library outputs a censored version of the input audio, replacing the specified words with a beep sound.
Features
- Audio Censorship: Automatically censors a list of provided words in an audio file.
- Text-to-Speech Integration: Supports transcribing audio to text using Faster-Whisper.
- Customizable Word List: You can easily add or modify the words you want to censor.
Installation
pip install censorship.py
Make sure you have installed ffmpeg for audio processing.
Use this command if you have Linux or a subsystem (recommended)
sudo apt update && sudo apt install ffmpeg
Or install it on Windows using Chocolatey
choco install ffmpeg
Usage
Here is an example of how to use the Censorship Audio library:
from censorship import Censorship_Audio
if __name__ == "__main__":
censorship = Censorship_Audio() # Create an instance of the Censorship class
censorship.censure_audio('audio_to_censure.mp3', 'censored_audio.mp3', ['word1', 'word2'])
# Optional: Transcribe the censored audio to text
audio_to_text = censorship.return_audio_text('censored_audio.mp3')
print(audio_to_text)
Contributing
If you find a bug or have an idea for improvement, feel free to open an issue or submit a pull request. Contributions are always welcome!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file censorship_py-0.1.tar.gz
.
File metadata
- Download URL: censorship_py-0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 578884b44c6d9acab1311b7f9b295b07e4c000e893758f1e2be44e766a20c977 |
|
MD5 | 6db4940468b0a6bf2869c393c7422d9b |
|
BLAKE2b-256 | 26091a61949cfc564796d6da7b9c190eb33b4cb8aeda7845b50c3bb8870037b5 |
File details
Details for the file censorship.py-0.1-py3-none-any.whl
.
File metadata
- Download URL: censorship.py-0.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37a5e0ee49aba3007efc066c7b218566f09c559398d930a76e2aac6ff8c78faf |
|
MD5 | cf213b366d68d6c61a4fbf9199b9095f |
|
BLAKE2b-256 | ea4c452ff5bca15a68fff47e67df65cca910cf2ec997aee32276286c2040c8e4 |