Skip to content

Local DE Coach v0.5.0 — Whisper-only architecture (fixes all setup failures)

Choose a tag to compare

@bif26 bif26 released this 13 Sep 02:25
· 6 commits to main since this release

🎯 Root cause finally found and fixed

All your previous setup failures (python-Levenshtein, rapidfuzz, webrtcvad, tokenizers, torch) were caused by one underlying issue: facebook/wav2vec2-base-german was made private/gated by Facebook.

curl https://huggingface.co/facebook/wav2vec2-base-german/resolve/main/config.json
→ HTTP 401 Unauthorized

The only public German Wav2Vec2 models are the large variants (~1.2 GB RAM — too big for your 2 GB budget). Every attempt to work around this (different rapidfuzz versions, different transformers versions) was treating symptoms, not the disease.

✨ The fix: Whisper-only architecture

Switched to Whisper tiny int8 for both scoring and live mode. This:

  • ✅ Drops resident RAM from ~910 MB → ~150 MB (6× reduction)
  • ✅ Removes torch + transformers dependencies entirely (~700 MB disk saved)
  • ✅ Simplifies the engine (no more model swap, single lifecycle)
  • ✅ Works on Python 3.14 with all prebuilt wheels — no source builds
  • ✅ Whisper tiny int8: ~75 MB on disk, ~150 MB RAM, handles German well

📊 Before vs After

Metric v0.4.x (Wav2Vec2 + Whisper) v0.5.0 (Whisper only)
Resident RAM (scoring) ~910 MB ~150 MB
Disk (model weights) ~435 MB ~75 MB
Disk (Python deps) ~1.2 GB ~500 MB
Download time (first setup) ~10 min ~2 min
Source build failures Multiple None
Python 3.14 compatibility Fragile Clean

📋 What changed

  • backend/core/engine.py: Removed all Wav2Vec2 code. transcribe_scoring() now uses Whisper with beam_size=5 for better accuracy. swap_model() is a backward-compatible no-op.
  • backend/config.py: Removed wav2vec2_model_id.
  • backend/requirements.txt: Removed transformers and torch (was 200 MB download).
  • scripts/fetch_models.sh: Only downloads Whisper tiny (~75 MB).
  • setup.sh: Removed Step 4 (torch install). Now 6 steps instead of 7. Adds cleanup of leftover torch/transformers.

🚀 How to upgrade

cd /home/bif/Desktop/Lab/Local_DE_Coach
git pull origin main
rm -rf backend/.venv   # clean slate — old venv has torch/transformers
./setup.sh
./start.sh

This time setup will:

  1. Install system deps via pacman (skip if already installed)
  2. Create a clean venv (no torch!)
  3. Install pip + faster-whisper + fastapi + librosa + rapidfuzz (~2 min)
  4. Build the SvelteKit frontend (~10s)
  5. Download Whisper tiny (~75 MB — much smaller than Wav2Vec2's 360 MB)

All via prebuilt wheels. No source builds. No pyo3 errors. No 401 errors.


Full changelog: see git log v0.4.6..v0.5.0