Skip to content

cracktro: add kiosk voice mode (V) using browser speech synthesis - #80480

Merged
pelikhan merged 5 commits into
mainfrom
pelikhan/cracktro-kiosk-tts
Nov 23, 2026
Merged

pelikhan merged 5 commits into
mainfrom
pelikhan/cracktro-kiosk-tts

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

Kiosk mode already shows closed captions (a two-speaker conversation per slide) on muted screens. This adds an optional voice mode that reads those same captions aloud, so the deck can run as a narrated loop without audio files or network calls.

Approach

  • V (or a new voice button beside CC in the kiosk dock) toggles text-to-speech using the browser's native speechSynthesis. Each slide's caption lines are spoken in order, alternating two voices for the two speakers. If only one voice exists, a lower and a higher pitch distinguish them.
  • Support check: the runtime tests for speechSynthesis.speak and SpeechSynthesisUtterance. If either is missing, the button is disabled and dimmed, its title says "Voice is not supported in this browser", and V and controller.voice() are no-ops.
  • Voice is off by default. Turning it on starts kiosk mode if needed, it ends with kiosk mode, and the choice holds for later kiosk runs (same model as CC).
  • The kiosk timer holds a slide until its last line is spoken, capped at 60 s past the dwell so a stalled engine cannot freeze the rotation.
  • New controller API voice(on?), typed in runtime.d.ts; V is added to the help and key legends.

Validation

  • Two new runtime tests in docs/tests/talk.spec.ts: one with a fake speech engine (speaking, slide hold, toggles, preference persistence), one with speechSynthesis removed (disabled button). These could not run locally because the sandbox blocks Playwright browsers; please rely on CI.
  • Verified manually in a browser: the real deck speaks the caption lines, the dock buttons lay out without overlap, the unsupported path disables the button, and a fake engine shows slides waiting for speech to finish.
  • node --check and npm run check:cracktro pass.

No slide content changed (runtime chrome only), so there are no slide screenshots.

pelikhan and others added 2 commits November 23, 2026 09:50
Reads each slide's caption lines aloud with speechSynthesis, alternating
two voices (or pitches), holding the kiosk slide until speech ends. The
voice button is disabled where speech synthesis is unsupported.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review November 23, 2026 17:54
Copilot AI adaptive review requested due to automatic review settings November 23, 2026 17:54
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

The [aw] No-Op Runs tracker omits agent messages. The category uses structured run status, not interpretation of agent prose.

No-op message

Completed PR #80480 review: published one requested-change inline finding and recorded review history.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~5 AIC · ⌖ ~2 AIC · ⊞ 1.7K · history

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

❌ Test Quality Sentinel failed during test quality analysis.

Incomplete work

Test Quality Sentinel could not complete a reliable review of PR #80480: the pre-fetched test evidence is stale/incomplete. /tmp/gh-aw/agent/test-files.txt and /tmp/gh-aw/agent/test-diff.txt are empty, and the Go/JS test-function extraction files are empty, but pr-meta.json and diff-numstat.txt list docs/tests/talk.spec.ts as modified (+86 lines). git diff between base 45403a8 and head cddc4d8 confirms docs/tests/talk.spec.ts has 86 inserted lines, so the changed test diff was not captured. Test quality cannot be scored without that diff.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 7.4K · history

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

The [aw] No-Op Runs tracker omits agent messages. The category uses structured run status, not interpretation of agent prose.

No-op message

Lean already. Ship.

Generated by Ponytail Reviewer for #80480 · codex · routed: gpt61 medium · ~5 AIC · ⌖ ~1 AIC · ⊞ 176 · history

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 7.1K · history

Rank speech voices natural/neural first, then warm broadcast-style names;
never pick macOS novelty voices (Safari flags every voice as default, which
picked Albert). Slightly lower pitch and unhurried rate.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-23T17:57:12Z
review_event: REQUEST_CHANGES
top_themes: speech timeout contract mismatch
files_reviewed: docs/public/cracktro/runtime.js
comment_count: 1
History

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~5 AIC · ⌖ ~2 AIC · ⊞ 1.7K · history
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The voice hold timeout does not match the documented contract: it is capped at 60 seconds from slide entry rather than 60 seconds after the normal dwell. Please align the implementation and documentation before merge; the inline comment identifies the exact location.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~5 AIC · ⌖ ~2 AIC · ⊞ 1.7K
Comment /review to run again

Comment thread docs/public/cracktro/runtime.js Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-31d0e084-d4b9-47b4-bf86-545dce7a3548","parents":[],"payload":{"id":"ldg-753b6acf-871d-4624-bbc7-d435b5c9244d","operation":"append","value":{"finding_count":1,"head_sha":"cddc4d81bff728893c6907a414111cb668d78b5b","outcome":"findings"}},"sha":"sha256:9ed7d0540a2b6c483ba736427f74472d32fdc6a014f3dae6e947fc5a41fc27be","timestamp":"2026-11-23T18:04:23.600Z","type":"ledger_append","version":1}
History

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Voice selection can use network-dependent synthesis despite the no-network guarantee, and the narration cutoff starts too early, potentially canceling speech before the documented deadline.

2 open issues
What changed in this PR

Adds optional spoken narration to the cracktro deck’s kiosk mode, using the existing caption conversations and browser speech synthesis.

Changes:

  • Adds the V shortcut, voice dock button, voice selection, and kiosk timing integration.
  • Exposes a typed voice(on?) controller API and documents voice-mode behavior.
  • Adds runtime tests for narration, toggles, preference persistence, and unsupported browsers.
File Description
docs/​tests/​talk.spec.ts Adds speech-engine and unsupported-browser tests.
docs/​README.md Documents voice controls and kiosk behavior.
docs/​public/​cracktro/​runtime.js Implements narration, controls, voice selection, and slide holds.
docs/​public/​cracktro/​runtime.d.ts Declares the voice controller API.
.github/​skills/​cracktro/​slides.md Clarifies that captions also supply narration.
.github/​skills/​cracktro/​SKILL.md Documents voice support alongside generated captions.

Review effort: Balanced (adaptive)

Comment thread docs/public/cracktro/runtime.js Resolved
Comment thread docs/public/cracktro/runtime.js Resolved

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /tdd (triage recommended /tdd and /grill-with-docs; skill selection used the triage output). Requesting changes on one behavioural mismatch and unverified tests.

📋 Key Themes & Highlights

Key Themes

  • Hold cap timing: VOICE_HOLD_MS runs from slide entry, but the PR text and code comment say "60 s past the dwell". This is the blocking item.
  • Unverified tests: the two new Playwright cases were not run, and the stalled-engine path has no coverage.
  • Kiosk re-entry: checked the V to kiosk path. The on === voiceOn guard prevents a duplicate first line, so no change is needed there.

Positive Highlights

  • ✅ No key conflicts: V is free, and the .vcb dock slot sits clear of the other kiosk controls.
  • ✅ Voice toggles follow the same persistence pattern as captions (capPref), and the feature is a no-op when speechSynthesis is unavailable.
  • ✅ capLines falls back to heading and summary, so slides without a script still speak.

@copilot please address the inline review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 7.1K
Comment /matt to run again

Comment thread docs/public/cracktro/runtime.js Resolved
Comment thread docs/tests/talk.spec.ts Resolved
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (docs/public/cracktro/runtime.js:2486): address unresolved feedback - Review comment
  3. Review (docs/public/cracktro/runtime.js:2466): address unresolved feedback - Review comment
  4. Review (docs/public/cracktro/runtime.js:2497): address unresolved feedback - Review comment
  5. Review (docs/public/cracktro/runtime.js:2467): address unresolved feedback - Review comment
  6. Review (docs/tests/talk.spec.ts:1883): address unresolved feedback - Review comment

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "5e6a8b6fc6d81c51eee42be3a1aab09cd678af30",
  "kind": "requested",
  "schema_version": "1",
  "state": "616a588c540c613568dd6bde365730739ccc7f41b367a0777f04f22e50beb603",
  "work": [
    "37ad1fd336df51ec7758dfc87b3785aedb89f55497110a55969cf63a322be2a6",
    "52eea20aff35bd7ab1acd2e95533e47e79d40fbf0499b22264c2d8c1e7fd3014",
    "71401f3d5b23436b89135411bf23d2f7a9d29e1a5d8c6bf3365443c8ff605805",
    "b3f239be9c633a0dfeb1e4f5cf57907039568632b9f6b0304f5a7d70be540dc4",
    "bc8e662fa50b6b840323e4e38086ce81a39ceb63035cbf9860e023075a60336f"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 7K · history
Comment /souschef to run again

pelikhan and others added 2 commits November 23, 2026 10:56
The 60 s voice hold now starts when the kiosk dwell ends and restarts
with every countdown; a stalled-engine test asserts release at dwell+60 s.
Voice selection keeps only localService voices (no network), stays silent
without one, and waits once for voiceschanged while the list loads.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan

Copy link
Copy Markdown
Collaborator Author

Batch follow-up on the bot comments:

  • PR Code Quality Reviewer (#issuecomment-7109378490) and its comment memory (#issuecomment-7109584089, #issuecomment-7109609815): the requested change (speech timeout contract) is fixed in d2c3139; the voice hold is now timed from the dwell's end.
  • Test Quality Sentinel (#issuecomment-7109379049): no code change; its run failed on stale pre-fetched test evidence, not on the tests. A rerun should pick up the talk.spec.ts diff, which now also has a stalled-engine case.
  • Ponytail Reviewer (#issuecomment-7109386154) and Matt Pocock Skills Reviewer (#issuecomment-7109387785): no action needed.
  • PR Sous Chef (#issuecomment-7110484507): merged latest main (f38ee92, no conflicts) and addressed all five review threads; Playwright cannot run in my sandbox, so CI must confirm the voice tests.

@pelikhan
pelikhan merged commit 3decbd6 into main Nov 23, 2026
40 checks passed
@pelikhan
pelikhan deleted the pelikhan/cracktro-kiosk-tts branch November 23, 2026 18:57
Copilot AI requested a review from gh-aw-bot November 23, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants