From 8d21b54ef3e30cfdbc8fc15303740c04eb5dfbae Mon Sep 17 00:00:00 2001 From: Sam Sykes Date: Tue, 11 Nov 2025 18:24:08 +0000 Subject: [PATCH] Revert to `ErrorFrame`. --- src/pipecat/services/speechmatics/tts.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pipecat/services/speechmatics/tts.py b/src/pipecat/services/speechmatics/tts.py index 76c7a1a8a..b8fe172e7 100644 --- a/src/pipecat/services/speechmatics/tts.py +++ b/src/pipecat/services/speechmatics/tts.py @@ -16,7 +16,6 @@ from pydantic import BaseModel from pipecat.frames.frames import ( ErrorFrame, - FatalErrorFrame, Frame, TTSAudioRawFrame, TTSStartedFrame, @@ -174,15 +173,16 @@ class SpeechmaticsTTSService(TTSService): continue except (ValueError, ArithmeticError): - yield FatalErrorFrame( - error=f"{self} Service unavailable [503] (attempts {attempt})" + yield ErrorFrame( + error=f"{self} Service unavailable [503] (attempts {attempt})", + fatal=True, ) return # != 200 : Error if response.status != 200: - yield FatalErrorFrame( - error=f"{self} Service unavailable [{response.status}]" + yield ErrorFrame( + error=f"{self} Service unavailable [{response.status}]", fatal=True ) return @@ -225,7 +225,7 @@ class SpeechmaticsTTSService(TTSService): break except Exception as e: - yield ErrorFrame(error=f"{self}: Error generating TTS: {e}") + yield ErrorFrame(error=f"{self}: Error generating TTS: {e}", fatal=True) finally: # Emit the TTS stopped frame yield TTSStoppedFrame()