Renaming the method to _maybe_reconnect_on_user_stopped_speaking.

This commit is contained in:
filipi87
2026-04-24 13:08:32 -03:00
parent b30df95f13
commit 2ce203aeb8

View File

@@ -408,7 +408,7 @@ class STTService(AIService):
await self._handle_vad_user_stopped_speaking(frame) await self._handle_vad_user_stopped_speaking(frame)
await self.push_frame(frame, direction) await self.push_frame(frame, direction)
elif isinstance(frame, UserStoppedSpeakingFrame): elif isinstance(frame, UserStoppedSpeakingFrame):
await self._maybe_reconnect() await self._maybe_reconnect_on_user_stopped_speaking()
await self.push_frame(frame, direction) await self.push_frame(frame, direction)
elif isinstance(frame, STTUpdateSettingsFrame): elif isinstance(frame, STTUpdateSettingsFrame):
if frame.service is not None and frame.service is not self: if frame.service is not None and frame.service is not self:
@@ -508,8 +508,8 @@ class STTService(AIService):
self._finalize_pending = False self._finalize_pending = False
self._last_transcript_time = 0 self._last_transcript_time = 0
async def _maybe_reconnect(self): async def _maybe_reconnect_on_user_stopped_speaking(self):
"""Check if reconnection is needed after user stops speaking. """Check if reconnection is needed after the user stops speaking.
Called when the user's full turn has ended and the transcription has been Called when the user's full turn has ended and the transcription has been
received. Re-enables reconnection and triggers any deferred reconnect that received. Re-enables reconnection and triggers any deferred reconnect that