Propagate Azure TTS/STT cancellation errors to the pipeline

Azure TTS _handle_canceled was putting None (the normal completion
signal) into the audio queue for all cancellation reasons, so run_tts
treated errors identically to success—silently producing no audio.
Now error cancellations put an Exception marker in the queue, which
run_tts converts to an ErrorFrame.

Azure STT had no canceled event handler at all, so auth failures,
network errors, and rate-limit cancellations were invisible. Added
_on_handle_canceled which pushes an ErrorFrame upstream via push_error.

Fixes pipecat-ai/pipecat#3892
This commit is contained in:
Mark Backman
2026-03-02 12:24:10 -05:00
parent 5a6a93e277
commit e6b9c5c4dc
3 changed files with 22 additions and 2 deletions

1
changelog/3893.fixed.md Normal file
View File

@@ -0,0 +1 @@
- Fixed Azure TTS and STT services silently swallowing cancellation errors (invalid API key, network failures, rate limiting) instead of propagating them as `ErrorFrame`s to the pipeline.