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.15.tar.gz
.
File metadata
- Download URL: censorship_py-0.15.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 | 98bdbc75f69835f4ef5709a78c2d26d92b252a3bb4e923224e53df1e48d535ed |
|
MD5 | 8363dc35ca5c7a3537ee0d3eb1c01a92 |
|
BLAKE2b-256 | 1428febcb0909298f0cb7240835ec1093db8986d06f4ec74aebcb800cf0a8e0f |
File details
Details for the file censorship.py-0.15-py3-none-any.whl
.
File metadata
- Download URL: censorship.py-0.15-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 | fef62b590a0accee0757e79698bd32dbfef4608a5f65aec02e045a47a11982d8 |
|
MD5 | c84b7906857aad4bdc33ab8d92ce5bb1 |
|
BLAKE2b-256 | d2dc0fe3718114103050dac1c1d49489de7ac38af1e38902c2986f783942920a |