DEV Community

Discussion on: Drop Your Challenge Submission Here

Collapse
 
axrisi profile image
Nikoloz Turazashvili (@axrisi)

Hey! Love the project - the terminal aesthetic and zero-dependency approach is really clean.
I put together a PR that replaces the browser TTS with pre-generated ElevenLabs audio for higher quality voice guidance, while keeping full offline support through the Service Worker cache: PR #2

feat: replace browser TTS with pre-generated ElevenLabs audio #2

Replaces window.speechSynthesis (browser TTS) with high-quality pre-generated ElevenLabs audio files.

  • All 103 voice clips are cached by the Service Worker for full offline support
  • Includes a Node.js generation script (scripts/generate-tts.js) for reproducibility
  • Matches the original voice flow exactly (only exercise 1 gets full description read aloud)
  • Custom audio queue system handles sequential playback and graceful cancellation seamlessly

Would love to hear what you think!

Collapse
 
highflyer910 profile image
Thea

Thank you so much for this, I really appreciate the effort! 🙏
The audio quality is impressive, but I want to keep the app fully lightweight and dependency-free; that was one of the core goals from the start..

Also tbh, the slightly robotic browser TTS fits the terminal aesthetic better than I expected, it feels almost intentional 🤭

So I’ll stick with the native browser APIs for now. Though this is a very cool approach and a great reference for anyone who wants higher-quality audio in their own fork!

Thread Thread
 
axrisi profile image
Nikoloz Turazashvili (@axrisi)

No worries. It's up to you :)

The PR didn't add any dependencies, but increased the overall size of the project by 4mb because of the audios being sent to users. And the Vercel free plan for bandwidth is good enough, and I made it to be cached in the browser. So it shouldn't be a big deal either.

But again, all good! You can close that PR if there is no need.

Thread Thread
 
highflyer910 profile image
Thea

Thank you for clarifying! Really appreciate the thought you put into this, especially the caching approach 😊 I’ll keep it in mind