Marcus/Config/instruction.json

278 lines
12 KiB
JSON

{
"_description": "Bilingual voice command instructions — single source of truth for the voice dispatch tables. Loaded by Voice/marcus_voice.py at module level. Adding a new motion command, a new accent variant, a new Arabic phrasing, or fixing a misheard wake-word transcription is a JSON-only edit; no Python change required.",
"_format": "wake_words = whole-word substrings the dispatch gate looks for in the user's transcript. Any match (English or Arabic) opens motion for the current turn. actions = per-motion phrase tables. Each action has a `canonical` string (what marcus_brain receives), `user_phrases` (what the user might SAY when asking for the motion — used for fuzzy-match + Arabic-to-English translation after wake-word strip), and `bot_phrases` (what Gemini might SPEAK when acknowledging — used by the bot-side dispatcher to fire motion off Gemini's own confirmation). All matching is substring-based; English entries are matched case-insensitively, Arabic entries match as-is. Keep the canonical string consistent with Brain/command_parser.py vocabulary.",
"wake_words": {
"_comment": "All variants of the robot's name 'Sanad' — the gate that authorises motion. Add new mishearings here when you see them in logs/transcript.log under HEARD lines that should have triggered motion but didn't.",
"english": [
"sanad", "sannad", "sennad", "sunnad", "sinnad", "sonnad",
"sanat", "sunnat", "sonnat", "sinnat", "sennat",
"sanid", "sanud", "saned", "sanod", "sanaad",
"senad", "sinad", "sonad", "sunad",
"sanah", "sanath", "sanadh", "sonadh",
"samad", "somad", "sumad",
"thanad", "zanad",
"sa nad", "san ad", "san odd", "san add"
],
"arabic": [
"سند", "سنّاد", "ساند", "سنود", "سنَد", "سنّد", "سَند",
"يا سند", "يا سنّاد", "يا ساند", "يا سَند"
]
},
"actions": {
"turn_right": {
"canonical": "turn right",
"user_phrases": {
"english": ["turn right", "rotate right", "spin right", "go right", "face right", "right"],
"arabic": ["استدر يميناً", "استدر يمينا", "ادر يميناً", "ادر يمينا", "لف يمين", "لف يميناً", "يمين"]
},
"bot_phrases": {
"english": ["turning right"],
"arabic": ["أستدير يميناً", "أستدير يمينا", "استدير يميناً", "استدير يمينا", "ألف يميناً", "ألف يمينا"]
}
},
"turn_left": {
"canonical": "turn left",
"user_phrases": {
"english": ["turn left", "rotate left", "spin left", "go left", "face left", "left"],
"arabic": ["استدر يساراً", "استدر يسارا", "ادر يساراً", "ادر يسارا", "لف يسار", "لف يساراً", "يسار", "شمال"]
},
"bot_phrases": {
"english": ["turning left"],
"arabic": ["أستدير يساراً", "أستدير يسارا", "استدير يساراً", "استدير يسارا", "ألف يساراً", "ألف يسارا"]
}
},
"turn_around": {
"canonical": "turn around",
"user_phrases": {
"english": ["turn around", "turn back", "spin around", "about face", "face the other way"],
"arabic": ["استدر للخلف", "استدر إلى الوراء", "اتجه للخلف", "ادر للخلف", "ارجع وجهك"]
},
"bot_phrases": {
"english": ["turning around"],
"arabic": ["أستدير للخلف", "أستدير إلى الوراء", "استدير للخلف"]
}
},
"move_forward": {
"canonical": "move forward",
"user_phrases": {
"english": ["move forward", "go forward", "walk forward", "step forward", "forward", "keep going", "walk ahead", "move ahead"],
"arabic": ["تحرك للأمام", "تحرك إلى الأمام", "اذهب للأمام", "امش للأمام", "تقدم", "للأمام", "أمام"]
},
"bot_phrases": {
"english": ["moving forward", "walking forward", "stepping forward", "going forward", "going ahead"],
"arabic": ["أتحرك للأمام", "أتحرك إلى الأمام", "أتقدم", "أمشي للأمام", "أذهب للأمام"]
}
},
"move_backward": {
"canonical": "move backward",
"user_phrases": {
"english": ["move back", "move backward", "go back", "go backward", "walk back", "walk backward", "step back", "backward", "back", "reverse"],
"arabic": ["تحرك للخلف", "تحرك إلى الخلف", "اذهب للخلف", "امش للخلف", "ارجع", "ارجع للخلف", "للخلف", "خلف"]
},
"bot_phrases": {
"english": ["moving backward", "moving back", "walking backward", "walking back", "stepping back", "going back"],
"arabic": ["أتحرك للخلف", "أتحرك إلى الخلف", "أرجع", "أمشي للخلف", "أعود للخلف"]
}
},
"move_right": {
"canonical": "move right",
"user_phrases": {
"english": ["step right", "move right", "slide right", "strafe right", "sidestep right"],
"arabic": ["تحرك يميناً", "تحرك يمينا", "خطوة يمين", "اتجه يميناً"]
},
"bot_phrases": {
"english": ["moving right", "stepping right", "sliding right"],
"arabic": ["أتحرك يميناً", "أتحرك يمينا", "أخطو يميناً"]
}
},
"move_left": {
"canonical": "move left",
"user_phrases": {
"english": ["step left", "move left", "slide left", "strafe left", "sidestep left"],
"arabic": ["تحرك يساراً", "تحرك يسارا", "خطوة يسار", "اتجه يساراً"]
},
"bot_phrases": {
"english": ["moving left", "stepping left", "sliding left"],
"arabic": ["أتحرك يساراً", "أتحرك يسارا", "أخطو يساراً"]
}
},
"stop": {
"canonical": "stop",
"user_phrases": {
"english": ["stop", "halt", "wait", "pause", "freeze", "hold", "stop moving", "stand still", "don't move"],
"arabic": ["توقف", "قف مكانك", "اوقف", "انتظر", "اثبت", "لا تتحرك"]
},
"bot_phrases": {
"english": ["stopping", "halting", "holding"],
"arabic": ["أتوقف", "توقفت", "أنتظر"]
}
},
"sit_down": {
"canonical": "sit down",
"user_phrases": {
"english": ["sit down", "sit", "take a seat", "have a seat"],
"arabic": ["اجلس", "ارتح", "اقعد"]
},
"bot_phrases": {
"english": ["sitting down", "sitting"],
"arabic": ["أجلس", "أقعد", "جلست"]
}
},
"stand_up": {
"canonical": "stand up",
"user_phrases": {
"english": ["stand up", "stand", "get up", "rise"],
"arabic": ["قف", "انهض", "ارفع نفسك"]
},
"bot_phrases": {
"english": ["standing up", "getting up", "rising"],
"arabic": ["أقف", "أنهض", "وقفت"]
}
},
"wave_hello": {
"canonical": "wave hello",
"user_phrases": {
"english": ["wave hello", "wave", "say hi", "greet", "wave to me", "wave at me"],
"arabic": ["لوّح", "لوح", "لوّح بيدك", "حيّ", "سلّم"]
},
"bot_phrases": {
"english": ["waving hello", "waving", "saying hi", "greeting"],
"arabic": ["ألوّح", "ألوح", "ألوّح بيدي", "أحيّ", "أسلّم"]
}
},
"raise_arm": {
"canonical": "raise arm",
"user_phrases": {
"english": ["raise arm", "raise your arm", "lift your arm", "arm up", "hand up"],
"arabic": ["ارفع يدك", "ارفع ذراعك", "اليد للأعلى"]
},
"bot_phrases": {
"english": ["raising arm", "raising my arm", "lifting my arm", "arm up"],
"arabic": ["أرفع يدي", "أرفع ذراعي"]
}
},
"lower_arm": {
"canonical": "lower arm",
"user_phrases": {
"english": ["lower arm", "lower your arm", "drop your arm", "arm down", "hand down", "rest your arm"],
"arabic": ["اخفض يدك", "اخفض ذراعك", "اليد للأسفل", "نزل يدك"]
},
"bot_phrases": {
"english": ["lowering arm", "lowering my arm", "dropping my arm", "arm down"],
"arabic": ["أخفض يدي", "أخفض ذراعي", "أنزل يدي"]
}
},
"point": {
"canonical": "point",
"user_phrases": {
"english": ["point", "point at it", "point to it", "point there"],
"arabic": ["اشر", "أشِر", "اشر إلى", "اشر هناك"]
},
"bot_phrases": {
"english": ["pointing"],
"arabic": ["أشير"]
}
},
"come_here": {
"canonical": "come here",
"user_phrases": {
"english": ["come here", "come to me", "come closer", "approach", "get closer", "come over here", "come"],
"arabic": ["تعال", "تعال هنا", "تعال إليّ", "اقترب", "تقرب"]
},
"bot_phrases": {
"english": ["coming over", "coming to you", "approaching"],
"arabic": ["آتي إليك", "أقترب", "أتقرّب"]
}
},
"follow_me": {
"canonical": "follow me",
"user_phrases": {
"english": ["follow me", "come with me", "walk with me"],
"arabic": ["اتبعني", "تعال معي", "امش معي"]
},
"bot_phrases": {
"english": ["following you", "following", "coming with you"],
"arabic": ["أتبعك", "آتي معك", "أمشي معك"]
}
},
"stay_here": {
"canonical": "stay here",
"user_phrases": {
"english": ["stay here", "stay", "wait here", "hold position", "don't follow me"],
"arabic": ["ابق هنا", "اثبت هنا", "انتظر هنا", "لا تتبعني"]
},
"bot_phrases": {
"english": ["staying here", "staying", "waiting here"],
"arabic": ["أبقى هنا", "أنتظر هنا", "أثبت هنا"]
}
},
"go_home": {
"canonical": "go home",
"user_phrases": {
"english": ["go home", "return home", "head home", "go back home"],
"arabic": ["اذهب للبيت", "اذهب إلى البيت", "ارجع للبيت", "عُد للبيت"]
},
"bot_phrases": {
"english": ["going home", "heading home", "returning home"],
"arabic": ["أعود للبيت", "أذهب للبيت", "أتجه للبيت"]
}
},
"patrol": {
"canonical": "patrol",
"user_phrases": {
"english": ["patrol", "start patrol", "begin patrol", "patrol the area", "walk the route"],
"arabic": ["طوف", "ابدأ الدورية", "ابدأ التطواف", "افحص المكان"]
},
"bot_phrases": {
"english": ["patrolling", "starting patrol", "beginning patrol"],
"arabic": ["أطوف", "أبدأ الدورية", "أبدأ التطواف"]
}
},
"look_around": {
"canonical": "look around",
"user_phrases": {
"english": ["look around", "scan the room", "scan around", "survey the area", "have a look around"],
"arabic": ["انظر حولك", "تفحص المكان", "افحص المكان", "تطلع حولك"]
},
"bot_phrases": {
"english": ["looking around", "scanning around", "surveying the area"],
"arabic": ["أنظر حولي", "أتفحص المكان", "أتطلع حولي"]
}
},
"what_do_you_see": {
"canonical": "what do you see",
"user_phrases": {
"english": ["what do you see", "what can you see", "describe this", "describe what you see", "tell me what you see"],
"arabic": ["ماذا ترى", "ماذا تشاهد", "صف ما تراه", "أخبرني ماذا ترى"]
},
"bot_phrases": {
"english": [],
"arabic": []
}
}
}
}