From 9cc28fa6fbaed44e1cfe9f942d649fd492ec29bf Mon Sep 17 00:00:00 2001 From: vegu-ai-tools <152010387+vegu-ai-tools@users.noreply.github.com> Date: Thu, 14 May 2026 13:06:26 +0300 Subject: [PATCH] Fix TTS message generation to include message_id in websocket handler --- CHANGELOG.yaml | 1 + src/talemate/agents/tts/websocket_handler.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.yaml b/CHANGELOG.yaml index 0cdbdacd..6393d977 100644 --- a/CHANGELOG.yaml +++ b/CHANGELOG.yaml @@ -8,6 +8,7 @@ - "Game Loop Event: Fixed an internal scene-loop event being constructed with the wrong scene reference, surfaced by the pydantic migration." - "Conversation Agent: Stopped injecting `#` into the LLM stop-sequence list on every conversation turn. The conversation agent's prompt-parameter hook now only wipes character-name stop sequences when the `inject_character_names_into_stop` setting is disabled, and is a no-op otherwise." - "Scene-Group Templates: Templates created via the prompt manager under the `scene` agent prefix (stored at `{scene}/templates/scene/`) are now resolvable from Jinja `{% include %}` calls regardless of the active agent type." + - "Intro Message TTS: Fixed the scene tools audio control not activating when TTS was manually triggered for the intro message. The intro isn't a real scene message and has no id, so audio playback was emitted without a message id; the `intro` id is now forwarded through generation." 0.37.0: features: - "System Prompt Template Variable: Added {{ system_prompt }} template variable for system prompt overrides. Use it to include the default system prompt within a custom override, at both the app and client level." diff --git a/src/talemate/agents/tts/websocket_handler.py b/src/talemate/agents/tts/websocket_handler.py index d5f2e65a..80dc8709 100644 --- a/src/talemate/agents/tts/websocket_handler.py +++ b/src/talemate/agents/tts/websocket_handler.py @@ -553,7 +553,9 @@ class TTSWebsocketHandler(Plugin): await self.signal_operation_failed("No text to generate speech for.") return - await tts_agent.generate(text, character, message=message) + await tts_agent.generate( + text, character, message=message, message_id=payload.message_id + ) await self.signal_operation_done()