summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-02-22 17:45:09 +0300
committerGrail Finder <wohilas@gmail.com>2026-02-22 17:45:09 +0300
commit1e13c7796d3777b290643475e34a23c168794c32 (patch)
tree2516925bcb43d934a48badce617b7a6e79241a98
parent9a727b21ad487d52dbf411ed54929505e7341c8b (diff)
Fix: character specific context tts
-rw-r--r--helpfuncs.go7
1 files 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
}
}