From 677bfcd2a978caf6de915a3ee00563734bfd5145 Mon Sep 17 00:00:00 2001 From: javis-bot Date: Tue, 23 Jun 2026 00:19:20 +0900 Subject: [PATCH] feat: log the resolved whisper device on bridge load The bridge only logged Whisper's device on the CPU-fallback path, so a successful GPU (or silent CPU) load was invisible. Print the CTranslate2- resolved device on success and on the fallback load, so it is verifiable that STT is actually running on cuda alongside ollama (GPU) and MeloTTS (cuda). Co-Authored-By: Claude Opus 4.7 --- bridge/server.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bridge/server.py b/bridge/server.py index daf2a8a..285c868 100644 --- a/bridge/server.py +++ b/bridge/server.py @@ -150,12 +150,17 @@ def _ensure_brain(): compute = os.environ.get("WHISPER_COMPUTE_TYPE", "auto") try: whisper = WhisperModel(cfg.whisper_model, device=device, compute_type=compute) + # Log the device actually resolved by CTranslate2 (device="auto" + # picks cuda when available) so a silent CPU load is visible. + resolved = str(getattr(getattr(whisper, "model", None), "device", device)).lower() + print(f"[bridge] whisper loaded on {resolved} (compute={compute})", flush=True) except Exception as ge: # GPU not available / unsupported -> fall back to CPU so the # bridge still works without a GPU passed to the container. if device != "cpu": print(f"[bridge] whisper device='{device}' failed ({ge}); falling back to CPU", flush=True) whisper = WhisperModel(cfg.whisper_model, device="cpu", compute_type="int8") + print("[bridge] whisper loaded on cpu (compute=int8)", flush=True) else: raise