The Rokid AIUI Build Behind 'Say Clearly', a Voice-Practice Coach for AI Glasses
Rokid AIUI has a published, voice-driven AI glasses app to study, and the build shows how to solve three recurring problems: de-duplicating voice input, keeping context without a backend, and validating model output before showing it. The patterns transfer directly to other voice-first or on-device AI apps.
Rokid's AIUI Studio now supports a full development-to-publishing flow for AI glasses apps, and a recent walkthrough shows how to put it to work. The app built is 'Say Clearly', a voice-interactive coach that helps users practice self-introductions. It asks follow-up questions based on the user's stated identity, experience, and the help they can offer; when they stall, it offers sentence completions, and when time is tight it switches to a compact mode. At the end it generates a full summary and a draft introduction from the user's own statements.
The development process is deliberately incremental. After the platform generates a minimal project, the developer makes one checkable change at a time: first a welcome page, then voice input, then model calls, then error handling. Speech recognition uses the platform's SpeechRecognition API, and the code carefully prevents duplicate submissions by checking whether the current instance is still active. Context is managed manually in page state, storing every turn with its question and answer, keeping valid user facts for the final draft, and marking superseded answers rather than deleting them.
Model output goes through strict validation before it reaches the interface. The LanguageModel API is used per request, with a JSON contract that specifies question, feedback, action, stage, and mode. The app rejects outputs that don't conform, allows only valid moves between practice stages, and retries once with repair information if the format fails. Timeouts cap the wait at 35 seconds for coaching and 45 seconds for summary. After simulator testing and real-device packaging, the app was submitted and now shows as published in AIUI Studio.
The incremental build order is a direct response to AI-generated code that sometimes produces empty or incomplete files; checking one page at a time isolates whether the problem is generation, event handling, or model response.
Without a backend, the page itself acts as the session store; keeping question-answer pairs and valid facts in local state is how the model gets coherent context across turns.
Treating model output as untrusted until it passes a schema and business-rule check reduces the chance of nonsense or unsafe responses; the app rejects any response that isn't structurally valid or doesn't respect the practice-stage constraints.
Marking old answers as superseded instead of deleting them preserves the ability to trace why the model made a particular recommendation, which helps when debugging or explaining the final introduction.
The system prompt explicitly forbids the model from evaluating pronunciation, tone, or personality, and from inventing facts; this keeps the coach's output safe and grounded in the user's actual statements.