Eine Svelte-App zur Audio-Transkription mit WhisperX und Named Entity Recognition mit GLiNER.
whisperx-app/
├── backend/
│ ├── main.py # FastAPI Backend
│ └── requirements.txt
└── frontend/
├── src/
│ ├── App.svelte # Haupt-Svelte-Komponente
│ └── main.js
├── index.html
├── package.json
└── vite.config.js
brew install ffmpeg / apt install ffmpeg)cd backend
# Virtuelle Umgebung erstellen
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Abhängigkeiten installieren
pip install -r requirements.txt
# WhisperX benötigt ggf. zusätzlich:
pip install torch torchaudio --index-url https://download.pytorch.org/whl/cpu
# Mit CUDA (GPU):
# pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu118
cd backend
source venv/bin/activate
python main.py
Der Server läuft auf http://localhost:8000.
API-Dokumentation: http://localhost:8000/docs
cd frontend
npm install
npm run dev
Das Frontend läuft auf http://localhost:5173 und proxied API-Anfragen automatisch zum Backend.
npm run build
npm run preview
| Komponente | Modell | Hinweise |
|---|---|---|
| Transkription | WhisperX base |
Austauschbar: small, medium, large-v3 |
| NER | GLiNER gliner_multi-v2.1 |
Multilingual, zero-shot Kategorien |
In backend/main.py, Zeile ~30:
_whisper_model = whisperx.load_model("base", device, ...)
# Optionen: "tiny", "base", "small", "medium", "large-v2", "large-v3"