feat(tts): System-Flag speak (ja/nein) pro Antwort statt <voice>-Tag-Hack

Stefans Idee: die QUELLE entscheidet ueber Vorlesen, nicht der Reply-Inhalt.
Fast-Path (reiner Steuerbefehl) = speak=False (stumm); ARIA-Antworten
(local/claude) = speak=True (vorlesen ok — eine Ansage ist sogar nett).

- agent.chat() gibt jetzt (reply, answered_by, speak) zurueck; main.py
  ChatOut.speak; background.py-Aufrufer angepasst.
- bridge: liest speak aus /chat, reicht es an _process_core_response; bei
  speak=False wird TTS uebersprungen — VOR jeder <voice>-Logik.

Robust: unabhaengig davon, ob die Skill-fast_pattern-Reply ein <voice></voice>
enthaelt (das verlor ARIA beim semantischen Skill-Rebuild — genau der Bug).
App braucht keinen Change: kein xtts_request -> kein Audio -> stumm.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-11 14:55:12 +02:00
co-authored by Claude Opus 4.8
parent 2dfe6fd9c3
commit 0a2e59d756
4 changed files with 23 additions and 6 deletions
+5 -3
View File
@@ -1299,7 +1299,9 @@ class Agent:
self.conversation.add("assistant", fast_reply, project_id=active_project_id)
if active_project_id:
projects_mod.touch_project(active_project_id)
return fast_reply, "fast-path"
# Fast-Path = reiner Steuerbefehl → NICHT vorlesen (speak=False).
# System-Flag statt <voice>-Tag: robust, unabhaengig vom Skill-Inhalt.
return fast_reply, "fast-path", False
# 1. User-Turn an die Konversation
self.conversation.add("user", user_message, source=source,
@@ -1313,7 +1315,7 @@ class Agent:
# teure Claude-Aufbau + Tool-Loop wird uebersprungen. Sonst None → Claude.
local_reply = self._try_local_fast_lane(user_message, active_project_id)
if local_reply is not None:
return local_reply, "local"
return local_reply, "local", True # ARIA-Antwort → vorlesen ok
# 2. Hot Memory (alle pinned Punkte)
hot = self.store.list_pinned()
@@ -1514,7 +1516,7 @@ class Agent:
# 7. Assistant-Turn (final reply) in die Conversation
self.conversation.add("assistant", final_reply,
project_id=active_project_id)
return final_reply, "claude"
return final_reply, "claude", True # ARIA-Antwort → vorlesen ok
# ── Tool-Dispatcher ───────────────────────────────────────