Auto finalize fix

This commit is contained in:
Matej Marinko
2025-05-29 13:24:53 +02:00
parent 51b79bd6a1
commit db7b60cfe9

View File

@@ -349,6 +349,7 @@ class SonioxSTTService(STTService):
if last_token_age_ms > self._auto_finalize_delay_ms:
# No new tokens received for a while, finalize the transcription.
logger.debug("No pending frames, sending finalize message")
self._last_tokens_received = None
await self._websocket.send(FINALIZE_MESSAGE)
except websockets.exceptions.ConnectionClosed:
# Expected when closing the connection.