How adeel-raza/profanity-filter works
This is a local video profanity-cleaning application with CLI and Gradio entry points. Users provide a video and optionally subtitles; detection identifies profanity intervals, timestamp merging prepares removal ranges, and video/subtitle processing produces cleaned files. The README also documents standalone subtitle generation and optional Intel OpenVINO acceleration. Some orchestration calls are only partially excerpted, so uncertain links are omitted or marked unverified.
Main entry points: audio_profanity_detector_fast.py Whisper profanity detection · clean.py CLI cleaner · gradio_app.py Gradio interface · subtitle_processor.py Subtitle processing
Components 15
User entry points
- CLI cleaner
clean.py - Gradio interface
gradio_app.py - App launcher
app.py
Detection and configuration
- Whisper profanity detection
audio_profanity_detector_fast.py - Audio profanity detection
audio_profanity_detector.py - Hybrid detection
hybrid_profanity_detector.py - Profanity word rules
profanity_words.py - Subtitle generation
generate_subtitles.py
Media processing
- Timestamp merger
timestamp_merger.py - Subtitle processing
subtitle_processor.py - Video cutting and muting
video_cutter.py - Cleaned video and subtitles
Optional acceleration
- Intel GPU probe
intel_gpu_probe.py - OpenVINO Whisper backend
openvino_whisper_backend.py
Other components
- Local user
Connections 23
- Local user → CLI cleaner: provides video
README.md - Local user → Gradio interface: uploads video
README.md - App launcher → Gradio interface: creates interface
app.py - CLI cleaner → Whisper profanity detection: uses detection
clean.py - CLI cleaner → Hybrid detection: selects mode
clean.py - CLI cleaner → Subtitle processing: detects from subtitles
clean.py - CLI cleaner → Timestamp merger: merges intervals
clean.py - CLI cleaner → Video cutting and muting: processes video
clean.py - Gradio interface → Whisper profanity detection: transcribes audio
gradio_app.py - Gradio interface → Timestamp merger: merges intervals
gradio_app.py - Gradio interface → Video cutting and muting: cuts segments
gradio_app.py - Gradio interface → Subtitle processing: processes subtitles
gradio_app.py - Whisper profanity detection → Profanity word rules: checks words
audio_profanity_detector_fast.py - Audio profanity detection → Profanity word rules: uses word list
audio_profanity_detector.py - Subtitle processing → Profanity word rules: filters text
subtitle_processor.py - Hybrid detection → Whisper profanity detection: refines intervals
hybrid_profanity_detector.py - Hybrid detection → Subtitle processing: finds candidates
hybrid_profanity_detector.py - Hybrid detection → Timestamp merger: merges intervals
hybrid_profanity_detector.py - Subtitle generation → Whisper profanity detection: uses transcription
generate_subtitles.py - Whisper profanity detection → Intel GPU probe: checks hardware
audio_profanity_detector_fast.py - Whisper profanity detection → OpenVINO Whisper backend: tries backend
audio_profanity_detector_fast.py - Video cutting and muting → Cleaned video and subtitles: writes video
- Subtitle processing → Cleaned video and subtitles: writes subtitles