Merge pull request #4368 from pipecat-ai/filipi/stt_service

Fix issue where STTService unintentionally created a method with the same name as SegmentedSTTService.
This commit is contained in:
Filipi da Silva Fuchter
2026-04-24 14:31:36 -03:00
committed by GitHub

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._handle_user_stopped_speaking(frame) 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 _handle_user_stopped_speaking(self, frame: UserStoppedSpeakingFrame): async def _maybe_reconnect_on_user_stopped_speaking(self):
"""Handle user stopped speaking frame. """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