Files
sami7777 cea6005bf4 Initial commit: sermon-clean v0.1.0
Find, cut, paste replacements in sermon audio.
- engine.py: SermonClean core (BadSegment, trim, concat, splice verify)
- cli.py: find/cut/paste/pipe subcommands
- elevenlabs.py: optional ElevenLabs rendering hook
- 25 tests passing (timestamp parsing, BadSegment validation, end-to-end trim on real audio)
- pyproject.toml: pip-installable; dep only on ffmpeg/ffprobe system-wide
- README + LICENSE (MIT) + examples/segs.json

Validated against the krystie audio cache (OGG/Opus 48kHz mono).
2026-07-27 02:40:18 -07:00

35 lines
1.1 KiB
Python

"""sermon-clean — find bad segments in sermon audio, cut them out, splice in ElevenLabs replacements.
Three-step pipeline:
1. FIND — locate bad segments (manual timestamps, ffmpeg silence detection, or
faster-whisper transcription with optional profanity/keyword flag).
2. CUT — trim the original audio into N+1 good segments using ffmpeg.
3. PASTE — render replacement clips via ElevenLabs (or supply pre-rendered MP3s),
splice everything back together with a bit-exact concat.
The default mode is "I already know the timestamps" (fastest, no transcribe cost).
Auto-detect mode transcribes and prints a candidate list for you to confirm/edit
before splicing. Interactive mode lets you scrub through and press space to mark.
"""
from .engine import (
SermonClean,
BadSegment,
Replacement,
parse_timestamp,
format_timestamp,
probe_duration,
probe_codec,
)
__version__ = "0.1.0"
__all__ = [
"SermonClean",
"BadSegment",
"Replacement",
"parse_timestamp",
"format_timestamp",
"probe_duration",
"probe_codec",
]