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:
parent
744a27cfd1
commit
dc20570f6d
|
|
@ -613,25 +613,30 @@ async def run_loop(runner: F5Runner) -> None:
|
||||||
tls_fallback_tried = False
|
tls_fallback_tried = False
|
||||||
|
|
||||||
# Status-Broadcast: erst loading, dann ready nach erfolgreichem Load.
|
# 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
|
# Plus: config_request damit wir die persistierte Diagnostic-Config
|
||||||
# bekommen, falls aria-bridge ihre nicht von alleine sendet.
|
# bekommen, falls aria-bridge ihre nicht von alleine sendet.
|
||||||
async def _load_with_status():
|
async def _load_with_status():
|
||||||
|
try:
|
||||||
if runner.model is not None:
|
if runner.model is not None:
|
||||||
|
logger.info("Initial: broadcaste ready (Modell schon im RAM: %s)", runner.model_id)
|
||||||
await _broadcast_status(ws, "ready",
|
await _broadcast_status(ws, "ready",
|
||||||
model=runner.model_id,
|
model=runner.model_id,
|
||||||
loadSeconds=runner.last_load_seconds)
|
loadSeconds=runner.last_load_seconds)
|
||||||
else:
|
else:
|
||||||
|
logger.info("Initial: broadcaste loading + lade Modell '%s'", runner.model_id)
|
||||||
await _broadcast_status(ws, "loading", model=runner.model_id)
|
await _broadcast_status(ws, "loading", model=runner.model_id)
|
||||||
try:
|
|
||||||
await runner.ensure_loaded()
|
await runner.ensure_loaded()
|
||||||
await _broadcast_status(ws, "ready",
|
await _broadcast_status(ws, "ready",
|
||||||
model=runner.model_id,
|
model=runner.model_id,
|
||||||
loadSeconds=runner.last_load_seconds)
|
loadSeconds=runner.last_load_seconds)
|
||||||
except Exception as e:
|
logger.info("Initial: sende config_request an aria-bridge")
|
||||||
await _broadcast_status(ws, "error", error=str(e)[:200])
|
|
||||||
await _send(ws, "config_request", {"service": "f5tts"})
|
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])
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
asyncio.create_task(_load_with_status())
|
asyncio.create_task(_load_with_status())
|
||||||
|
|
||||||
# TTS-Worker fuer diese Verbindung starten
|
# TTS-Worker fuer diese Verbindung starten
|
||||||
|
|
|
||||||
|
|
@ -227,12 +227,18 @@ async def run_loop(runner: WhisperRunner) -> None:
|
||||||
# Plus: config_request an aria-bridge — wir wissen nicht ob
|
# Plus: config_request an aria-bridge — wir wissen nicht ob
|
||||||
# sie auch grad reconnected hat oder schon laenger online ist.
|
# sie auch grad reconnected hat oder schon laenger online ist.
|
||||||
async def _initial_handshake():
|
async def _initial_handshake():
|
||||||
|
try:
|
||||||
if runner.model is not None:
|
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)
|
await _broadcast_status(ws, "ready", model=runner.model_size)
|
||||||
else:
|
else:
|
||||||
await _broadcast_status(ws, "loading", model=runner.model_size or WHISPER_MODEL)
|
init_model = runner.model_size or WHISPER_MODEL
|
||||||
# aria-bridge soll uns die persistierte Voice-Config schicken
|
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"})
|
await _send(ws, "config_request", {"service": "whisper"})
|
||||||
|
except Exception as e:
|
||||||
|
logger.exception("Initial-Handshake crashed: %s", e)
|
||||||
asyncio.create_task(_initial_handshake())
|
asyncio.create_task(_initial_handshake())
|
||||||
|
|
||||||
async for raw in ws:
|
async for raw in ws:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue