diff --git a/src/pipecat/processors/frame_processor.py b/src/pipecat/processors/frame_processor.py index 23cd2fc16..b117cec83 100644 --- a/src/pipecat/processors/frame_processor.py +++ b/src/pipecat/processors/frame_processor.py @@ -801,7 +801,10 @@ class FrameProcessor(BaseObject): await self.__cancel_process_task() self.__create_process_task() except Exception as e: - await self.push_error(error_msg=f"Uncaught exception in {self} when handling _start_interruption: {e}", exception=e) + await self.push_error( + error_msg=f"Uncaught exception in {self} when handling _start_interruption: {e}", + exception=e, + ) async def __internal_push_frame(self, frame: Frame, direction: FrameDirection): """Internal method to push frames to adjacent processors. diff --git a/src/pipecat/services/azure/stt.py b/src/pipecat/services/azure/stt.py index 4f9f95bb1..036b402e8 100644 --- a/src/pipecat/services/azure/stt.py +++ b/src/pipecat/services/azure/stt.py @@ -151,7 +151,9 @@ class AzureSTTService(STTService): self._speech_recognizer.recognized.connect(self._on_handle_recognized) self._speech_recognizer.start_continuous_recognition_async() except Exception as e: - await self.push_error(error_msg=f"{self} exception during initialization: {e}", exception=e) + await self.push_error( + error_msg=f"{self} exception during initialization: {e}", exception=e + ) async def stop(self, frame: EndFrame): """Stop the speech recognition service. diff --git a/src/pipecat/services/elevenlabs/stt.py b/src/pipecat/services/elevenlabs/stt.py index 38b6e150e..034532496 100644 --- a/src/pipecat/services/elevenlabs/stt.py +++ b/src/pipecat/services/elevenlabs/stt.py @@ -645,7 +645,9 @@ class ElevenLabsRealtimeSTTService(WebsocketSTTService): await self._call_event_handler("on_connected") logger.debug("Connected to ElevenLabs Realtime STT") except Exception as e: - await self.push_error(error_msg=f"{self}: unable to connect to ElevenLabs Realtime STT: {e}", exception=e) + await self.push_error( + error_msg=f"{self}: unable to connect to ElevenLabs Realtime STT: {e}", exception=e + ) async def _disconnect_websocket(self): """Disconnect from ElevenLabs Realtime STT WebSocket.""" diff --git a/src/pipecat/services/soniox/stt.py b/src/pipecat/services/soniox/stt.py index 2769800f9..79957fd97 100644 --- a/src/pipecat/services/soniox/stt.py +++ b/src/pipecat/services/soniox/stt.py @@ -403,7 +403,9 @@ class SonioxSTTService(STTService): if error_code or error_message: # In case of error, still send the final transcript (if any remaining in the buffer). await send_endpoint_transcript() - await self.push_error(error_msg=f"{self} error: {error_code} (_receive_task_handler) - {error_message}") + await self.push_error( + error_msg=f"{self} error: {error_code} (_receive_task_handler) - {error_message}" + ) finished = content.get("finished") if finished: