AudioBufferProcessor: call callback on CancelFrame
This commit is contained in:
@@ -69,6 +69,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed an issue in `AudioBufferProcessor` where user callback would not be
|
||||||
|
called on task cancellation.
|
||||||
|
|
||||||
- Fixed an issue where `ElevenLabsTTSService` messages would return a 1009
|
- Fixed an issue where `ElevenLabsTTSService` messages would return a 1009
|
||||||
websocket error by increasing the max message size limit to 16MB.
|
websocket error by increasing the max message size limit to 16MB.
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ class AudioBufferProcessor(FrameProcessor):
|
|||||||
if self._buffer_size > 0 and len(self._user_audio_buffer) > self._buffer_size:
|
if self._buffer_size > 0 and len(self._user_audio_buffer) > self._buffer_size:
|
||||||
await self._call_on_audio_data_handler()
|
await self._call_on_audio_data_handler()
|
||||||
|
|
||||||
if isinstance(frame, EndFrame):
|
if isinstance(frame, (CancelFrame, EndFrame)):
|
||||||
await self._call_on_audio_data_handler()
|
await self._call_on_audio_data_handler()
|
||||||
|
|
||||||
await self.push_frame(frame, direction)
|
await self.push_frame(frame, direction)
|
||||||
|
|||||||
Reference in New Issue
Block a user