Merge pull request #1367 from MaCaki/macaki/rime/send_msg_in_flush_audio

[rime client] Sending over trailing space to help indicate end of utt…
This commit is contained in:
Mark Backman
2025-03-12 14:25:18 -04:00
committed by GitHub
2 changed files with 6 additions and 0 deletions

View File

@@ -78,6 +78,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated the default mode for `CartesiaTTSService` and
`CartesiaHttpTTSService` to `sonic-2`.
### Fixed
- Fixed an issue in `RimeTTSService` where the last line of text sent didn't result in an audio output being generated.
## [0.0.58] - 2025-02-26
### Added

View File

@@ -249,7 +249,9 @@ class RimeTTSService(AudioContextWordTTSService):
async def flush_audio(self):
if not self._context_id or not self._websocket:
return
logger.trace(f"{self}: flushing audio")
await self._get_websocket().send(json.dumps({"text": " "}))
self._context_id = None
async def _receive_messages(self):