4590dc0fb9
Sermon-clean v0.2.0. Five new subcommands that round out the editor: - normalize (norm): Apply EBU R128 two-pass loudness normalization. Default -16 LUFS (podcast/YouTube). Configurable target LUFS, true peak, and loudness range. Output reports measured input loudness and applied gain offset. - silence-stats (ss): Quantitative summary of silence distribution — count, total/mean/median/longest silence, silence fraction, and silence runs per minute. Outputs JSON via --json. Useful for comparing recordings and picking the right threshold. - threshold-tune (tt): Auto-pick the silence threshold for the audio. Scans a set of candidate thresholds (default -25..-50), scores each against the target silence-runs-per-minute (default 4.0), picks the closest match. Shows the full scoring table. - denoise: Apply ffmpeg's afftdn filter for light FFT-based noise reduction. Configurable noise reduction dB (default 12) and noise floor dB (default -50). Output at 48kHz to match normalize. - batch: Run any of the subcommands across many files via glob. Output goes to --output-dir with --suffix (default '-fixed') and optional --extension override. Failures are collected, not raised — one bad file doesn't kill the whole batch. Implementation: - sermon_clean/processing.py: normalize_loudness + SilenceStats dataclass + silence_stats + threshold_tune. - sermon_clean/denoise.py: DenoiseResult + denoise. - sermon_clean/batch.py: run_batch + _expand_globs + _make_output_path. - sermon_clean/cli.py: 5 new cmd_* functions + 5 subparser registrations. Tests: - tests/test_processing.py (7 tests): silence-stats on silent vs loud, threshold-tune picks closest, normalize produces output + measures loud. - tests/test_denoise_batch.py (11 tests): denoise roundtrip, batch helpers (glob expansion, output naming), batch run with normalize + denoise, unknown subcommand raises, one-bad-file-in-batch continues. Total: 82/82 tests passing in 48s (was 64/64). Bumped version to 0.2.0. README updated: step-by-step workflow adds 1d-1g; subcommand table adds the 5 new commands; new 'Batch processing' section.
59 lines
1.7 KiB
TOML
59 lines
1.7 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=68", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "sermon-clean"
|
|
version = "0.2.0"
|
|
description = "Find bad segments in sermon audio, cut them out, splice in ElevenLabs replacements. Includes normalize, denoise, silence-stats, threshold-tune, and batch operations."
|
|
readme = "README.md"
|
|
requires-python = ">=3.9"
|
|
license = {text = "MIT"}
|
|
authors = [
|
|
{name = "Sami Ahmed", email = "hello@sami-ahmed.net"},
|
|
]
|
|
keywords = ["audio", "ffmpeg", "sermon", "editing", "elevenlabs"]
|
|
classifiers = [
|
|
"Development Status :: 3 - Alpha",
|
|
"Intended Audience :: End Users/Desktop",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Operating System :: POSIX :: Linux",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Topic :: Multimedia :: Sound/Audio :: Editors",
|
|
]
|
|
|
|
# Runtime dependencies
|
|
# - numpy: per-chunk RMS computation in the waveform module
|
|
# - requests: only needed if you use ElevenLabs rendering
|
|
# - ffmpeg / ffprobe must be installed system-wide.
|
|
dependencies = [
|
|
"numpy>=1.20",
|
|
"requests>=2.31",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
# Whisper integration (optional, adds auto-detect mode)
|
|
auto = [
|
|
"faster-whisper>=1.0.0",
|
|
]
|
|
test = [
|
|
"pytest>=7.0",
|
|
]
|
|
|
|
[project.scripts]
|
|
sermon-clean = "sermon_clean.cli:main"
|
|
|
|
[project.urls]
|
|
Homepage = "https://git.sami/sami7777/sermon-clean"
|
|
Issues = "https://git.sami/sami7777/sermon-clean/issues"
|
|
|
|
[tool.setuptools]
|
|
packages = ["sermon_clean"]
|
|
|
|
[tool.setuptools.package-data]
|
|
sermon_clean = ["py.typed"]
|