debug: Initial-Handshake Logs damit man sieht was passiert

Beim user kommt nach 'RVS verbunden' nichts mehr — Modell-Download
startet nicht, banner aktualisiert sich nicht. Vermutung: alter Code
laeuft noch (kein neu gebauter Container) ODER der Initial-Handshake
crashed silent (asyncio.create_task ohne await schluckt Exceptions).

- whisper + f5tts: Initial-Handshake mit logger.info Zeilen, damit
  man sieht ob er ueberhaupt ausgefuehrt wird
- f5tts: zusaetzlich exception-Catch + fehler-broadcast falls der
  Modell-Load crashed

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
duffyduck 2026-04-24 17:54:12 +02:00
parent 744a27cfd1
commit dc20570f6d
2 changed files with 28 additions and 17 deletions

View File

@ -613,25 +613,30 @@ async def run_loop(runner: F5Runner) -> None:
tls_fallback_tried = False
# Status-Broadcast: erst loading, dann ready nach erfolgreichem Load.
# Modell wird hier (nicht ausserhalb der Schleife) gestartet damit
# der Loading-Status auch wirklich uebertragen werden kann.
# Plus: config_request damit wir die persistierte Diagnostic-Config
# bekommen, falls aria-bridge ihre nicht von alleine sendet.
async def _load_with_status():
if runner.model is not None:
await _broadcast_status(ws, "ready",
model=runner.model_id,
loadSeconds=runner.last_load_seconds)
else:
await _broadcast_status(ws, "loading", model=runner.model_id)
try:
try:
if runner.model is not None:
logger.info("Initial: broadcaste ready (Modell schon im RAM: %s)", runner.model_id)
await _broadcast_status(ws, "ready",
model=runner.model_id,
loadSeconds=runner.last_load_seconds)
else:
logger.info("Initial: broadcaste loading + lade Modell '%s'", runner.model_id)
await _broadcast_status(ws, "loading", model=runner.model_id)
await runner.ensure_loaded()
await _broadcast_status(ws, "ready",
model=runner.model_id,
loadSeconds=runner.last_load_seconds)
except Exception as e:
logger.info("Initial: sende config_request an aria-bridge")
await _send(ws, "config_request", {"service": "f5tts"})
except Exception as e:
logger.exception("Initial-Load crashed: %s", e)
try:
await _broadcast_status(ws, "error", error=str(e)[:200])
await _send(ws, "config_request", {"service": "f5tts"})
except Exception:
pass
asyncio.create_task(_load_with_status())
# TTS-Worker fuer diese Verbindung starten

View File

@ -227,12 +227,18 @@ async def run_loop(runner: WhisperRunner) -> None:
# Plus: config_request an aria-bridge — wir wissen nicht ob
# sie auch grad reconnected hat oder schon laenger online ist.
async def _initial_handshake():
if runner.model is not None:
await _broadcast_status(ws, "ready", model=runner.model_size)
else:
await _broadcast_status(ws, "loading", model=runner.model_size or WHISPER_MODEL)
# aria-bridge soll uns die persistierte Voice-Config schicken
await _send(ws, "config_request", {"service": "whisper"})
try:
if runner.model is not None:
logger.info("Initial: broadcaste ready (Modell schon im RAM: %s)", runner.model_size)
await _broadcast_status(ws, "ready", model=runner.model_size)
else:
init_model = runner.model_size or WHISPER_MODEL
logger.info("Initial: broadcaste loading (model=%s)", init_model)
await _broadcast_status(ws, "loading", model=init_model)
logger.info("Initial: sende config_request an aria-bridge")
await _send(ws, "config_request", {"service": "whisper"})
except Exception as e:
logger.exception("Initial-Handshake crashed: %s", e)
asyncio.create_task(_initial_handshake())
async for raw in ws: