Audio mode: native themed player, relabeled stats, opt-in transcript output#4
Conversation
Replace the custom Play/Replay buttons with the browser's native <audio controls> player: play/pause, seek, elapsed / total time, volume, and playback speed via its menu -- matching the original assessment's player. Styling is intentionally light (size + rounded corners + a tinted panel via ::-webkit-media-controls-panel) inside the existing design-system card, rather than a hand-rolled player. Speech synthesis remains the fallback when no config.audio.src is set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… output - Dashboard: in audio mode, label the two error cards 'Character errors' and 'Word errors' (they are char/word edit distances vs the hidden transcript, not keystroke/uncorrected errors as in classic mode). - stats.txt: include the expected and submitted transcriptions in audio mode. - extract_solution.py: print both transcriptions to STDOUT so the AI grader can evaluate the actual transcription alongside the numeric stats. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…uched Move the expected/submitted transcript persistence out of the shared serializer (stats.js) and into the audio module: AudioGame.submit() saves stats + both transcripts to stats.txt only when the task sets config.includeTranscript, reusing the exported saveStatistics for the numbers. completion.js skips its own save in that case so the transcript isn't overwritten. Reverts the earlier stats.js and extract_solution.py edits. STDOUT surfacing is done via a task-level .codesignal script (not the shared base task). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughAudio dictation now uses native audio controls for configured clips and speech synthesis as a fallback. Submission can append expected and submitted transcriptions to Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Three audio-mode improvements for the GTA typing-assessment port, all with the shared serializer (
stats.js) left untouched.1. Native audio player, themed to the design system
Replaces the custom Play/Replay buttons with the browser's native
<audio controls>player — play/pause, seek, elapsed / total time, volume, and playback speed (via its menu) — matching the original assessment's player. Styling is intentionally light (size + rounded corners + a tinted panel via::-webkit-media-controls-panel) inside the existing design-system card. Speech synthesis remains the fallback when noconfig.audio.srcis set.2. Relabel the audio results dashboard
In audio (free-transcription) mode the two error stats are edit distances against the hidden transcript, not keystroke/uncorrected errors as in classic mode. They're now labeled "Character errors" (char edit distance) and "Word errors" (word edit distance / WER) so the numbers read correctly next to the accuracy %.
3. Opt-in transcript output (
includeTranscripttask flag)When a task's
config.jsonsets"includeTranscript": true,AudioGame.submit()saves the stats plus the expected and submitted transcriptions tostats.txt, so a grader can compare the actual transcription (as the original grader did) — not just the numbers. Implementation notes:audio-game.js), reusing the exportedsaveStatisticsfor the numbers, sostats.js(the shared serializer) is untouched and unaffected for the base task / other modes.completion.jsskips its own save when a transcript save ran, so it isn't overwritten..codesignalscript override (kept out of this repo / the shared base task).Config example (audio task):
{ "gameType": "audio", "keyboard": false, "showStats": true, "realTimeStats": ["time", "chars"], "includeTranscript": true, "audio": { "src": "https://.../clip.mp4" } }Testing
npm run buildpasses.includeTranscripton the savedstats.txtcontains both transcripts (and none when off). No console errors.🤖 Generated with Claude Code