Skip to content

Commit 9fc4572

Browse files
committed
exc
1 parent 5f325c1 commit 9fc4572

File tree

1 file changed

+5
-6
lines changed
  • backends/advanced/src/advanced_omi_backend/services/transcription

1 file changed

+5
-6
lines changed

backends/advanced/src/advanced_omi_backend/services/transcription/__init__.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,13 @@ async def start_stream(self, client_id: str, sample_rate: int = 16000, diarize:
165165
start_msg["config"].setdefault("sample_rate", sample_rate)
166166
if diarize:
167167
start_msg["config"]["diarize"] = True
168-
169-
ws = await websockets.connect(url, open_timeout=10)
170-
await ws.send(json.dumps(start_msg))
171-
# Wait for confirmation; non-fatal if not provided
172168
try:
169+
ws = await websockets.connect(url, open_timeout=10)
170+
await ws.send(json.dumps(start_msg))
173171
await asyncio.wait_for(ws.recv(), timeout=2.0)
174-
except Exception:
175-
pass
172+
except Exception as e:
173+
logger.exception("Failed to start stream for client %s error %s", client_id, e)
174+
raise RuntimeError(f"Failed to start stream for client {client_id} error {e}") from e
176175
self._streams[client_id] = {"ws": ws, "sample_rate": sample_rate, "final": None, "interim": []}
177176

178177
async def process_audio_chunk(self, client_id: str, audio_chunk: bytes) -> dict | None:

0 commit comments

Comments
 (0)