A simple tool for a simple task: remove filler sounds ("ehm") from pre-recorded speeches. AI powered. Istruzioni in italiano in fondo al documento.
pip install -r requirements.txt
python simple_ehm-runnable.py /path/to/video.mp4 --srt --fastcut
# GUI (same folder): python simple_ehm_gui.pyOutput video + .srt debug track are written next to the original file.
- Modern stack: Python 3.10–3.13, TensorFlow 2.16–2.21 / Keras 3, Windows + Linux.
- NVIDIA GPU auto:
--device auto(default) uses the GPU when TensorFlow sees one (memory growth + mixed precision), else CPU.--device cpu|gputo force.--encoder auto(default) usesh264_nvencwhen your ffmpeg supports it, elselibx264(ignored with--fastcut).--list-devicesprints what your PC can use (TF GPUs + NVENC) and the recommended combo. Note: native Windows TF is CPU-only; for GPU inference use Linux + CUDA or WSL2 (NVENC encoding works on Windows too). - Auto language: IT/EN picked from the PC (Windows API / POSIX locale),
override with
--lang it|enorSIMPLE_EHM_LANG. GUI language menu included. Strings live inlangs/*.json– add a file to add a language. - Models from GitHub: first run downloads
model.kerasonly if the bundled one is missing or older than the releasemanifest.json(SIMPLE_EHM_REPO, defaultmorrolinux/simple-ehm). Override:--model,--model-url,SIMPLE_EHM_MODEL_URL,--no-download. Program update check included (release tag vsversion.py). - Resume merges:
--concat-onlyre-runs only the finalffmpeg concatfromtmp/inputs.txt(no re-analysis). - GUI:
simple_ehm_gui.py(tkinter, stdlib only): dark/light theme, IT/EN switch, progress bar with phase + ETA, live log, Stop (kills ffmpeg too), "Open folder" when done. Advanced options (CRF, FPS, window sizes, model, training data, analysis only, concat only) in a collapsible section. Settings are remembered between runs.python simple_ehm_gui.py video.mp4pre-fills the file.
- Windows:
build_windows.ps1→dist/simple-ehm.exe(≈3.5 GB with TF),dist/simple-ehm-gui.exe(≈16 MB).dist/is not tracked in git: binaries are published as GitHub Release assets together withSHA256SUMS.txt. - Before running: verify the hashes as explained in
VERIFY.md(SHA256 + Defender/VirusTotal + sandbox). - Linux:
build_linux.sh→dist/simple-ehm,dist/simple-ehm-gui. - Debian:
build_deb.sh→simple-ehm_<ver>_amd64.deb(sudo apt install ./simple-ehm_*_amd64.deb, also shows up in the app menu). PyInstaller specs:simple-ehm-cli.spec,simple-ehm-gui.spec.
Attach to a GitHub Release: model.keras + manifest.json
(models/manifest.json is the template: version, url, sha256, size).
Clients download only when manifest.version != model.keras.version.
Docker: docker build -t simple-ehm ., then ./convert.sh /path/to/video [args...]
(input files must be inside this folder for the bind-mount).
Un semplice strumento per un semplice compito: rimuovere gli "ehm" dai discorsi pre-registrati.
pip install -r requirements.txt
python simple_ehm-runnable.py /percorso/al/video.mp4 --srt --fastcut
# GUI: python simple_ehm_gui.py- GPU NVIDIA automatica:
--device autousa la GPU se TensorFlow la vede, altrimenti CPU.--encoder autousah264_nvencse il tuo ffmpeg lo supporta, altrimentilibx264.--list-devicesdice cosa può usare il PC. Su Windows nativo inferenza solo CPU; per la GPU serve Linux + CUDA o WSL2 (l'encoding NVENC funziona anche su Windows). - Lingua automatica: IT/EN dal PC (API Windows / locale Linux),
--lang it|enoSIMPLE_EHM_LANGper forzare. - Modelli da GitHub: al primo avvio scarica
model.kerassolo se manca o è più vecchio delmanifest.jsondella release. - GUI:
python simple_ehm_gui.py: tema scuro/chiaro, lingua IT/EN, barra di avanzamento, registro, Ferma, "Apri cartella" e opzioni avanzate. - Binary:
build_windows.ps1(exe),build_linux.sh+build_deb.sh(.deb).
Vedi le istruzioni originali nel notebook simple_ehm.ipynb e
trainingset/: clip WAV pcm_s16le mono 16 kHz per classe
(silence, speech, ehm), estraibili con --generate-training-data.
