Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(voice): exclude broad "mach" verb from reply-language switch

Ruben Lütke5ec01a1b98c0
diff --git a/jarvis/brain/voice_command_gate.py b/jarvis/brain/voice_command_gate.py
index 2293da6592..cc6748784a 100644
--- a/jarvis/brain/voice_command_gate.py
+++ b/jarvis/brain/voice_command_gate.py
@@ -101,12 +101,13 @@ _LANG_CHANGE_VERB = re.compile(
# "sprich Englisch", "speak English". German "spreche/spricht" (statements) are
# intentionally NOT matched.
_LANG_IMPERATIVE_SPEAK = re.compile(r"\b(?:sprich|speak\w*)\b", re.IGNORECASE)
-# (c) Output / request verbs — need a directional preposition to anchor the
-# language as the OUTPUT target. "respond in X", "antworte auf X", "rede auf X",
-# "set/stell … auf/to X", "mach … auf X".
+# (c) Reply / speech verbs — need a directional preposition to anchor the
+# language as Jarvis's reply target. Broad creation verbs such as "mach(en)" are
+# intentionally excluded: "make an HTML file about what comes up in English" is
+# an artifact request, not a persistent reply-language switch.
_LANG_OUTPUT_VERB = re.compile(
r"\b(?:antwort\w*|respond\w*|repl(?:y|ies)|answer\w*|rede|reden|set|stell\w*"
- r"|mach\w*)\b",
+ r")\b",
re.IGNORECASE,
)
_LANG_PREP = re.compile(r"\b(?:auf|zu|to|in|on)\b", re.IGNORECASE)