Skip to main content

Audio profanity is a big headache and while it seems small but if you're working with age sensitive research or projects. You would want to rate your audio and know more about it. that's where this simple project come into play. it uses OpenAI whisper model to segment audio and let you know before it becomes a headache.

What can be done?

Honestly, tons! For starters I have written a simple substring based matching algorithm that can match and compare from a list of curse words released by CMU (Carnegie Mellon). Find more info: https://www.cs.cmu.edu/~biglou/resources/bad-words.txt

  1. Segment the audio and extract the transcriptions (not intended rather a byproduct)
  2. Extract wordlist of your audio
  3. and then do matching

I have more ideas in mind and gonna maintain this like a dedicated religion. Because I have a newfound interest in audio segmentation.

How it works?

Good question!

from audiocencesored import *

# this func transcribes your audio. I didn't harcode file-name
transcribe_timestamps(audio_file, output_file)

# extracting the words from transcript
extract_words(json_file, output_file)

# let's download the CMU list
download_list(output_file="bad_words.txt")

# checking the score
check_profanity(word_list_file, bad_words_file, rating="R")

Anything to keep in mind?

Certainly! Have your audio files in .wav format.

Disclaimer: It's meant to be fun-project while providing support and feature is suppose to be religion for me. Drop a hi, on github if you have some features in mind. https://github.com/sleepingcat4/audio-profanity

Release files for audiocencesored 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for audiocencesored 0.2
File Size Uploaded
audiocencesored-0.2.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for audiocencesored 0.2
File Interpreter ABI Platform
audiocencesored-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.0 kB

Release files / audiocencesored-0.2.tar.gz

Download URL audiocencesored-0.2.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b76455706ade85117466dec9367a7162ac922bcdaa9f122b2a1cb22bd6704af9
BLAKE2b-256 checksum
How to use checksums
df417f297ddd0698a9a3e22c7de62f5c0a7acf676d749a73418af33f096f8a77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.8

Release files / audiocencesored-0.2-py3-none-any.whl

Download URL audiocencesored-0.2-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9dff77a8c78e804cad01d6a5c06722ff384bb9a1fb5dd1a7730aa4789805fc3
BLAKE2b-256 checksum
How to use checksums
5d431afe967fc226f26aa87c4c9a0c4f54dbfc2ac96d802b6633a50a630f3604
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.8

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page