diff --git a/CHANGELOG.md b/CHANGELOG.md index b1de5e50a..cbafd4de7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added support for Chirp voices in `GoogleTTSService`. -- Added a `flush_audio()` method to `FishTTSService`. +- Added a `flush_audio()` method to `FishTTSService` and `LmntTTSService`. - Added `on_user_turn_audio_data` and `on_bot_turn_audio_data` to `AudioBufferProcessor`. This gives the ability to grab the audio of only that diff --git a/src/pipecat/services/lmnt.py b/src/pipecat/services/lmnt.py index 31ddaf123..cfdf8e6cd 100644 --- a/src/pipecat/services/lmnt.py +++ b/src/pipecat/services/lmnt.py @@ -170,6 +170,11 @@ class LmntTTSService(InterruptibleTTSService): return self._websocket raise Exception("Websocket not connected") + async def flush_audio(self): + if not self._websocket: + return + await self._get_websocket().send(json.dumps({"flush": True})) + async def _receive_messages(self): """Receive messages from LMNT websocket.""" async for message in self._get_websocket():