Merge pull request #2538 from rimelabs/rime-flush-audio-update

Use Rime’s official {"operation": "flush"} command in flush_audio() for proper text buffer flushing
This commit is contained in:
Mark Backman
2025-09-01 18:01:20 -07:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -51,6 +51,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `pipecat.frames.frames.KeypadEntry` is deprecated and has been moved to
`pipecat.audio.dtmf.types.KeypadEntry`.
- Updated `RimeTTSService`'s flush_audio message to conform with Rime's official API.
## Removed
- Remove `StopInterruptionFrame`. This was a legacy frame that was not being

View File

@@ -323,7 +323,7 @@ class RimeTTSService(AudioContextWordTTSService):
return
logger.trace(f"{self}: flushing audio")
await self._get_websocket().send(json.dumps({"text": " "}))
await self._get_websocket().send(json.dumps({"operation": "flush"}))
self._context_id = None
async def _receive_messages(self):