Skip to content

feat: add voice audio reader for singleplayer tossups - #560

Open
krishaygarg wants to merge 1 commit into
qbreader:mainfrom
krishaygarg:feat/audio-reader
Open

feat: add voice audio reader for singleplayer tossups#560
krishaygarg wants to merge 1 commit into
qbreader:mainfrom
krishaygarg:feat/audio-reader

Conversation

@krishaygarg

Copy link
Copy Markdown

1. Summary / Objective

Adds an optional voice audio reader to singleplayer tossup practice. This allows users to listen to questions read aloud in a high-quality neural voice instead of only reading them visually.

2. Key Changes

  • On-Demand Neural Voices: Added a route to synthesize Edge neural TTS on-the-fly, returning base64 audio and word timestamps.
  • Speed Scaling: Speech rate dynamically matches the selected "Reading Speed" setting.
  • Toggle UI: Added an "Enable audio reader" toggle that takes effect on the next question.

3. How to Test / Verification

  1. Run npm install and ensure your local server is running.
  2. Navigate to http://localhost:3000/play/tossups/.
  3. Check the "Enable audio reader" toggle.
  4. Click "Start" / "Next" to hear the question.
  5. Verify that pressing Buzz immediately stops the audio and opens the input box.
  6. Verify that if you do not buzz, the 5-second countdown timer starts smoothly only after the last word is spoken.

4. Dependencies / Breaking Changes

  • New Package: Added node-edge-tts to the server dependencies for voice synthesis.
  • No Breaking Changes: All audio reader logic is encapsulated in new files (AudioReaderController.js and QuestionAudioPlayer.js).

@krishaygarg
krishaygarg marked this pull request as ready for review August 1, 2026 06:44
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.

1 participant