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
21
deploy/stt-service.service
Normal file
21
deploy/stt-service.service
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[Unit]
|
||||
Description=SpeechToText Service (faster-whisper, HTTP :9998, Wyoming :10300)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=%h/Python_Programs/SpeechToText
|
||||
ExecStart=%h/Python_Programs/SpeechToText/.venv/bin/uvicorn stt_service:app --host 0.0.0.0 --port 9998
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
# GPU eindeutig per UUID (nvidia-smi -L), NICHT per Index: CUDA zählt "fastest first",
|
||||
# nvidia-smi in PCI-Reihenfolge. GPU 2 = RTX 3090, teilt sich mit chatterbox-tts (~2,4 GB VRAM).
|
||||
Environment="CUDA_VISIBLE_DEVICES=GPU-83ba6d1f-ebbe-f8c8-1433-153e0ebc3866"
|
||||
Environment="STT_MODEL=large-v3-turbo"
|
||||
Environment="STT_LANGUAGE=de"
|
||||
Environment="STT_WYOMING_PORT=10300"
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Loading…
Reference in a new issue