Repository navigation
Voice on the board: speak, and the words go on the slide - #26
Merged
Merged
Conversation
A Voice text tool on the Smart Dock (a mic with a T, Prepare and Teach): tap or drag on the page to place a voice box and talk. Interim words show live and lighter, final words in the pen colour, wrapped inside the box and kept on the page (the box moves in, then shrinks its text). Spoken punctuation in English and Bangla, a ~2 s pause starts a new line. Tap the box, Esc or Done: one normal text item, one undo step per box. In Teach, hold the dock button for push-to-talk (the pen stays the tool); Space or a clicker's B / . toggles listening. On the box: EN / বাং, Text <-> Ask AI (the words become a chat prompt with the page or selection attached), typed <-> hand-written (the Solve this synthesiser), the privacy line. - voice/board.ts, VoiceBoard.tsx, voice-board.css, wrap.ts (line breaking with the board font; unit-tested in test/voice-board.test.ts) - dictation.ts: custom targets can give the text before the caret; the live-text bubble can be turned off per session - engine: add_text_box (world box, kept on the page, one commit) + test - live ops and MCP tools start_voice_text / stop_voice_text (board-only); the board wraps an agent's add_text at its w - settings: default mode, tap or hold to talk, hand-written default, pause length, students may ask the AI by voice - docs: ai-agents.md (Voice on the board, tools, protocol), ui-config.md, the live-board skill
shaitrish37
added a commit
that referenced
this pull request
Nov 24, 2026
… dock Voice on the board (#26) joins the agent-first checks: the Voice dock button, start_voice_text/stop_voice_text and the Voice on the board settings get rows in docs/agent-capabilities.md; the four presentation settings are in the agent allowlist, the students switch stays the teacher's. The voice ops are board-only, like the other board-app ops. # Conflicts: # AGENTS.md # apps/board/src/components/Dock.tsx # apps/board/src/live.ts # crates/rupok-live/src/apply.rs # crates/rupok-live/src/op.rs # docs/ai-agents.md
shaitrish37
added a commit
that referenced
this pull request
Nov 24, 2026
…ting Joined with #26 and #27: - show_progress and the AI in action, Class mode and students-ask settings get rows in docs/agent-capabilities.md; the four presentation settings (progress, sparkle, chime, line-by-line solutions) join the agent allowlist, Class mode and what students may ask stay the teacher's. - MCP annotations: the annotations test covers the agent-control tools; every write tool from #26/#27 declares idempotentHint, destructiveHint is kept for real deletes (delete_items, delete_pages, delete_stamp, library_trash) and dropped from undo_last_change (it only takes back the agent's own step); library_list counts as a read. - Class mode confirms the new destructive ops (delete_pages, delete_stamp, library_trash, dock layout changes) like the others. - update_text fits new words or a new size inside the page like add_text (never spilling onto a new page), with a regression test. - show_progress is a board-only op, like the voice ops. - Clippy (all targets): slice::from_ref in a voice test. # Conflicts: # AGENTS.md # apps/board/src/live.ts # crates/rupok-cli/src/lib.rs # crates/rupok-cli/src/mcp.rs # crates/rupok-cli/tests/fake-acp-agent.mjs # crates/rupok-live/src/op.rs # docs/ai-agents.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Teachers talk during class and don't want to write whole sentences. This adds Voice text to the Smart Dock (a mic with a T, in Prepare and Teach): speak, and the words go on the slide while you say them.
What the teacher gets
add_text_box).sendPrompt, with the page (or the selection) attached.setComposerDraft+openAiPanel).For agents (agent-first)
start_voice_text(x?, y?, w?, lang?, mode?, style?)andstop_voice_text(cancel?).point_at: the board app owns the microphone, andrupok-liveanswersUnsupported.stop_voice_textreturnstext,kindanditem_id.add_textwithwnow actually wraps on the board. The board breaks the lines atw, measured with its own font, and stores them as\n.docs/ai-agents.md(new "Voice on the board" section, tools table, protocol op list),docs/ui-config.md(tool idvoice), the live-board skill,skills/AGENTS.mdand the MCP server instructions.Settings (registry)
New entries under General → Voice on the board:
Keyboard → Space / B / . and Esc.
How it's built
voice/board.ts: state, dictation target, finish, push-to-talk, agent ops.voice/VoiceBoard.tsxandvoice-board.css: the place layer, the box in world units, the bar in screen pixels.voice/wrap.ts: pure line breaking by grapheme cluster, plus a canvas measure with the board font.dictation.ts:before(), for spacing and sentence capitals;Dock.tsx: 3 hunks. A hold on the button is push-to-talk; the tool joins the phone-drop list.modes.ts: the tool entry and its defaults.state.ts: theToolunion.controller.ts:setTooltreatsvoiceliketext. Pointer handlers are untouched.App.tsx: the mount.live.ts: op dispatch andadd_textwrapping.chat.ts: untouched.gen-icons.mjsgains composed icons (Solar mic, scaled, with a T). To resolve a conflict inicons.generated.ts, re-run the script.Tests
cargo fmt --checkandcargo clippy --workspace -D warningsare clean.cargo test -p rupok-live -p rupok-wasm -p rupok-clipasses, including:add_text_box_stays_on_the_page_in_one_undo_step;tsc --noEmitandvite buildOK;node --test apps/board/test/*.test.tspasses (6 new wrap/split tests: Latin, Bangla with দাঁড়ি, conjuncts kept whole).voice-board.mjs, with a stubbedSpeechRecognition: 48/48 PASS. It covers:rupok agent+ the fake ACP agent: the agent gets the prompt with page 1 attached and nothing is written on the board, in light and dark.bench/latency/pen-latency.mjs --swiftshader --check: all budgets pass (pointermove handler p95 0.30 ms, pen-up changed pixels 0.02 %).Limitations
write_handwriting, so its commit carries the agent tag "Voice text".add_textwrapping applies on the live board only. A lesson file keeps the text as given.openAiPanelis disabled in Student view.