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:
@@ -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.frames.frames.KeypadEntry` is deprecated and has been moved to
|
||||||
`pipecat.audio.dtmf.types.KeypadEntry`.
|
`pipecat.audio.dtmf.types.KeypadEntry`.
|
||||||
|
|
||||||
|
- Updated `RimeTTSService`'s flush_audio message to conform with Rime's official API.
|
||||||
|
|
||||||
## Removed
|
## Removed
|
||||||
|
|
||||||
- Remove `StopInterruptionFrame`. This was a legacy frame that was not being
|
- Remove `StopInterruptionFrame`. This was a legacy frame that was not being
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ class RimeTTSService(AudioContextWordTTSService):
|
|||||||
return
|
return
|
||||||
|
|
||||||
logger.trace(f"{self}: flushing audio")
|
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
|
self._context_id = None
|
||||||
|
|
||||||
async def _receive_messages(self):
|
async def _receive_messages(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user