From 1e13c7796d3777b290643475e34a23c168794c32 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Sun, 22 Feb 2026 17:45:09 +0300 Subject: [PATCH] Fix: character specific context tts --- helpfuncs.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/helpfuncs.go b/helpfuncs.go index 9a3255f..8719aab 100644 --- a/helpfuncs.go +++ b/helpfuncs.go @@ -108,14 +108,17 @@ func refreshChatDisplay() { } } +// stopTTSIfNotForUser: character specific context, not meant fot the human to hear func stopTTSIfNotForUser(msg *models.RoleMsg) { + if strings.Contains(cfg.CurrentAPI, "/chat") || !cfg.CharSpecificContextEnabled { + return + } viewingAs := cfg.UserRole if cfg.WriteNextMsgAs != "" { viewingAs = cfg.WriteNextMsgAs } // stop tts if msg is not for user - if cfg.CharSpecificContextEnabled && - !slices.Contains(msg.KnownTo, viewingAs) && cfg.TTS_ENABLED { + if !slices.Contains(msg.KnownTo, viewingAs) && cfg.TTS_ENABLED { TTSDoneChan <- true } }