Marcus/Config/config_gemini_action.json

251 lines
6.7 KiB
JSON

{
"_description": "Gemini action dispatch — maps spoken phrases to canonical motion commands. Mirrors Sanad's scripts/sanad_arm.txt pattern (Project/Sanad/scripts/sanad_arm.txt) but in JSON with action groups instead of a Python-set file. When stt.backend='gemini', Voice/marcus_voice.py::_dispatch_gemini_command matches the user's transcript (after stripping 'Sanad') against 'phrases' under each action and fires on_command with the action's 'canonical' string. Edit this file to add new spoken variants WITHOUT touching code.",
"_format": "actions.<action_key>.phrases — array of spoken variants (lowercase, punctuation stripped). Match is whole-word, case-insensitive. One phrase hit = fire.\nactions.<action_key>.canonical — the string passed to self._on_command(text, 'en'). Must be a recognised command in Brain/command_parser.py.\nactions.<action_key>.description — human-only; dispatcher ignores it.\nNon-motion conversation ('how are you', 'who are you', 'what do you see') is NOT listed here — Gemini answers those naturally via voice. Only physical actions live in this file.",
"settings": {
"_comment": "Dispatcher behaviour. require_wake_word=true means the transcript must contain 'Sanad' (or a fuzzy variant from stt.wake_words) before any phrase is considered — matches the current Marcus persona rule. fire_on_wake_match=true fires the action instantly on transcript; false defers until Gemini's turn_complete (robot speaks the acknowledgement first, then moves) — mirrors Sanad's fire_on_wake_match flag in voice/text_utils.maybe_trigger_arm.",
"trigger_enabled": true,
"require_wake_word": true,
"fire_on_wake_match": true,
"stream_buffer_sec": 2.0,
"dedup_window_sec": 2.0,
"repeat_suppress_sec": 0.25,
"pending_action_ttl_sec": 6.0
},
"actions": {
"turn_left": {
"canonical": "turn left",
"description": "Rotate in place 90° to the left.",
"phrases": [
"turn left",
"rotate left",
"spin left",
"go left",
"face left"
]
},
"turn_right": {
"canonical": "turn right",
"description": "Rotate in place 90° to the right.",
"phrases": [
"turn right",
"rotate right",
"spin right",
"go right",
"face right"
]
},
"turn_around": {
"canonical": "turn around",
"description": "Rotate 180°.",
"phrases": [
"turn around",
"turn back",
"spin around",
"about face",
"face the other way"
]
},
"move_forward": {
"canonical": "move forward",
"description": "Walk forward one step interval.",
"phrases": [
"move forward",
"go forward",
"walk forward",
"step forward",
"forward",
"keep going",
"walk ahead"
]
},
"move_back": {
"canonical": "move backward",
"description": "Walk backward one step interval.",
"phrases": [
"move back",
"move backward",
"go back",
"go backward",
"walk back",
"walk backward",
"step back",
"backward",
"reverse"
]
},
"step_left": {
"canonical": "move left",
"description": "Sidestep left.",
"phrases": [
"step left",
"move left",
"slide left",
"strafe left"
]
},
"step_right": {
"canonical": "move right",
"description": "Sidestep right.",
"phrases": [
"step right",
"move right",
"slide right",
"strafe right"
]
},
"stop": {
"canonical": "stop",
"description": "Halt current motion immediately.",
"phrases": [
"stop",
"halt",
"wait",
"pause",
"freeze",
"hold",
"stop moving",
"stand still",
"don't move"
]
},
"sit_down": {
"canonical": "sit down",
"description": "Sit down to the ground from standing.",
"phrases": [
"sit down",
"sit",
"take a seat",
"have a seat"
]
},
"stand_up": {
"canonical": "stand up",
"description": "Stand up from sitting.",
"phrases": [
"stand up",
"stand",
"get up",
"rise"
]
},
"wave_hello": {
"canonical": "wave hello",
"description": "Wave with the right arm.",
"phrases": [
"wave hello",
"wave",
"say hi",
"greet",
"wave to me",
"wave at me"
]
},
"raise_arm": {
"canonical": "raise arm",
"description": "Raise the right arm straight up.",
"phrases": [
"raise arm",
"raise your arm",
"lift your arm",
"arm up",
"hand up"
]
},
"lower_arm": {
"canonical": "lower arm",
"description": "Return the arm to the resting position.",
"phrases": [
"lower arm",
"lower your arm",
"drop your arm",
"arm down",
"hand down",
"rest your arm"
]
},
"point": {
"canonical": "point",
"description": "Point with the right arm (used after 'look at ...').",
"phrases": [
"point",
"point at it",
"point to it",
"point there"
]
},
"come_here": {
"canonical": "come here",
"description": "Approach the speaker.",
"phrases": [
"come here",
"come to me",
"come closer",
"approach",
"get closer",
"come over here"
]
},
"follow_me": {
"canonical": "follow me",
"description": "Follow the speaker until told to stop.",
"phrases": [
"follow me",
"come with me",
"walk with me"
]
},
"stay_here": {
"canonical": "stay here",
"description": "Stop following and hold position.",
"phrases": [
"stay here",
"stay",
"wait here",
"hold position",
"don't follow me"
]
},
"go_home": {
"canonical": "go home",
"description": "Return to the home position.",
"phrases": [
"go home",
"return home",
"head home",
"go back home"
]
},
"patrol": {
"canonical": "patrol",
"description": "Start the patrol routine.",
"phrases": [
"patrol",
"start patrol",
"begin patrol",
"patrol the area",
"walk the route"
]
},
"look_around": {
"canonical": "look around",
"description": "Scan the environment (vision sweep).",
"phrases": [
"look around",
"scan the room",
"scan around",
"survey the area",
"have a look around"
]
}
}
}