getVoiceCommandGuidance
Analyze proposed voice phrases for UX issues (homophones, digit ambiguity, collision with existing phrases) before wiring them into voice handlers.
Instructions
Analyze proposed voice phrases for UX issues (length, homophones, digit-usage, Meta wake-word collision, ambiguity with existing phrases) before wiring them into a wake trigger. Returns { results, generalGuidance, summary }: results is one entry per input phrase — { phrase, issues: [{ severity: 'error' | 'warning' | 'info', rule, message }], suggestions: [], collisions: [] } — where collisions lists exact-duplicate matches and issues carries per-rule findings (rules: too_short, homophone_risk, digit_usage, punctuation, collision, disambiguation, meta_wake_word_overlap, match_mode_hint). Only collision and meta_wake_word_overlap are error-severity (fix before wiring); everything else is advisory. generalGuidance is cross-phrase advice; summary is a one-line rollup. Applies equally to glasses.voice.onPhrase(phrase) { ... } registrations and direct glasses.audio.transcriptions() consumers — the issues this catches are the same regardless of which API surface dispatches the handler. USE before adding new phrase-match conditions to ANY voice-driven handler. DON'T USE for general voice docs (use searchDocs topic 'voice_integration').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phrases | Yes | The proposed wake / trigger phrases to analyze (at least one). Each is scored against every rule — e.g. ['take a photo', 'start recording']. | |
| existingPhrases | No | Phrases already wired into the app. Optional — when given, the analyzer also flags exact-duplicate collisions and shared-prefix ambiguity between the new `phrases` and these already-registered ones. |