Skip to content

Local DE Coach v0.5.1 — Dual backend: Whisper + Wav2Vec2 large

Choose a tag to compare

@bif26 bif26 released this 13 Sep 02:35
· 5 commits to main since this release

🎯 You were right — the model IS accessible

You found that facebook/wav2vec2-large-xlsr-53-german is public and downloadable (HTTP 200). Only the base version (wav2vec2-base-german) is private (401 Unauthorized).

The large model was always the architecture spec's first choice — we only switched to Whisper-only in v0.5.0 because we thought ALL Wav2Vec2 German models were gated.

✨ Dual-backend architecture

The engine now supports both ASR backends:

Backend RAM Accuracy Use case
Whisper tiny (default) ~150 MB Good Safe for all machines
Wav2Vec2 large (optional) ~1.2 GB Better Better suffix/umlaut detection

Switch at runtime:

# Default (light, ~150 MB RAM)
DE_COACH_ASR_BACKEND=whisper ./start.sh

# Wav2Vec2 (accurate, ~1.2 GB RAM — still under 2 GB ceiling)
DE_COACH_ASR_BACKEND=wav2vec2 ./start.sh

Why Wav2Vec2 is better for German

Wav2Vec2 produces character-level transcripts that are more phonetically accurate than Whisper. This matters for the scorer's:

  • Layer 3 (suffix quality): detecting dropped -en, -er, -e endings
  • Layer 4 (umlaut accuracy): distinguishing ä vs a, ö vs o

Whisper tends to auto-correct phonetic errors into valid German words, which masks pronunciation mistakes. Wav2Vec2 transcribes exactly what it hears — including mispronunciations — which is what the scorer needs.

📋 Changes

  • backend/core/engine.py: Dual backend with lazy loading. ensure_model() checks config.asr_backend and loads the right one. swap_model() can switch at runtime.
  • backend/config.py: Added asr_backend setting + wav2vec2_model_id = 'facebook/wav2vec2-large-xlsr-53-german'
  • backend/requirements.txt: Re-added transformers==4.49.0 (for Wav2Vec2). torch installed separately by setup.sh.
  • setup.sh: Re-added torch install step (Step 4/7). Now 7 steps.
  • scripts/fetch_models.sh: Downloads BOTH models by default. --whisper-only flag skips Wav2Vec2.

🚀 How to upgrade

cd /home/bif/Desktop/Lab/Local_DE_Coach
git pull origin main
rm -rf backend/.venv   # clean slate (needs torch + transformers back)
./setup.sh
./start.sh

Setup will download:

  1. torch CPU wheel (~200 MB)
  2. transformers + faster-whisper (~50 MB)
  3. Whisper tiny (~75 MB)
  4. Wav2Vec2 large (~1.2 GB — this takes a few minutes on slow internet)

If you want to skip the Wav2Vec2 download (saves ~1.2 GB disk):

./setup.sh  # then manually:
./scripts/fetch_models.sh --whisper-only --force

The app defaults to Whisper (~150 MB RAM). Switch to Wav2Vec2 with:

DE_COACH_ASR_BACKEND=wav2vec2 ./start.sh

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