AssemblyAISTTService: yield None instead of Frame()
This commit is contained in:
@@ -20,6 +20,9 @@ asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed an `AssemblyAISTTService` issue that could cause unexpected behavior
|
||||||
|
when yielding empty `Frame()`s.
|
||||||
|
|
||||||
- Fixed an issue where `OutputAudioRawFrame.transport_destination` was being
|
- Fixed an issue where `OutputAudioRawFrame.transport_destination` was being
|
||||||
reset to `None` instead of retaining its intended value before sending the
|
reset to `None` instead of retaining its intended value before sending the
|
||||||
audio frame to `write_audio_frame`.
|
audio frame to `write_audio_frame`.
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ class AssemblyAISTTService(STTService):
|
|||||||
self._audio_buffer = self._audio_buffer[self._chunk_size_bytes :]
|
self._audio_buffer = self._audio_buffer[self._chunk_size_bytes :]
|
||||||
await self._websocket.send(chunk)
|
await self._websocket.send(chunk)
|
||||||
|
|
||||||
yield Frame()
|
yield None
|
||||||
|
|
||||||
async def process_frame(self, frame: Frame, direction: FrameDirection):
|
async def process_frame(self, frame: Frame, direction: FrameDirection):
|
||||||
await super().process_frame(frame, direction)
|
await super().process_frame(frame, direction)
|
||||||
|
|||||||
Reference in New Issue
Block a user