STT-Dienst: Kern, HTTP/WebSocket/Wyoming-Service, CLI, Tests, systemd-Unit
- stt_core.py: Whisper-Engine (einmal laden, CPU-Fallback), Audio-Dekodierung jedes Formats, Halluzinationsfilter, Äußerungserkennung per Silero-VAD - stt_service.py: /health, /v1/audio/transcriptions (OpenAI), /transcribe (Rohdaten), WS /ws/stream; Inferenz im Worker-Thread, begrenzte Warteschlange (503) - stt_wyoming.py: Home-Assistant-Anbindung (TCP 10300) - stt_cli.py: Datei/Mikrofon über den Dienst oder lokal - Tests (Unit + Integration), README, requirements.txt, deploy/stt-service.service Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
6b23d8614a
commit
a986cbe42a
1 changed files with 2202 additions and 42 deletions
26
requirements.txt
Normal file
26
requirements.txt
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# SpeechToText — Abhängigkeiten
|
||||
# Getestet mit Python 3.12, CUDA 12.x (ctranslate2 4.6), Ubuntu
|
||||
#
|
||||
# GPU: ctranslate2 braucht cuBLAS 12 + cuDNN 9 (z. B. über pip-Pakete
|
||||
# nvidia-cublas-cu12 / nvidia-cudnn-cu12 oder eine vorhandene CUDA-Installation).
|
||||
|
||||
# --- STT-Kern (stt_core.py) ---
|
||||
faster-whisper>=1.2.0 # bringt ctranslate2, PyAV (Dekodierung) und Silero-VAD (onnxruntime) mit
|
||||
numpy>=1.26
|
||||
scipy>=1.11 # Resampling ganzer Signale
|
||||
soxr>=0.3 # Streaming-Resampling (optional, sonst Fallback auf scipy)
|
||||
|
||||
# --- Dienst (stt_service.py) ---
|
||||
fastapi>=0.115,<1.0
|
||||
uvicorn[standard]>=0.32,<1.0
|
||||
python-multipart>=0.0.9 # /v1/audio/transcriptions (multipart)
|
||||
wyoming>=1.6,<2.0 # Home Assistant (stt_wyoming.py)
|
||||
|
||||
# --- CLI (stt_cli.py) ---
|
||||
sounddevice>=0.4
|
||||
requests>=2.31
|
||||
websockets>=13
|
||||
|
||||
# --- Tests ---
|
||||
pytest>=8
|
||||
httpx>=0.27
|
||||
Loading…
Reference in a new issue