albirrkarim/react-speech-highlight-demo
React / Vanilla JS Text to Speech with highlighting the words and sentences that are being spoken using audio files, text to speech API, and web speech synthesis API
Supports flexible audio source fallback strategies (Web Speech Synthesis → audio files → API providers) and performs client-side word/sentence timing detection without external backend dependencies. Offers both React and vanilla JS implementations (45KB bundle), with React Native support, enabling use cases from interactive blogs to AI avatar lip-sync through viseme state synchronization. Provides SSR compatibility and integrates with third-party TTS providers (ElevenLabs, OpenAI, Google Cloud, Amazon Polly) while keeping synthesis logic entirely on the client.
186 stars.
Stars
186
Forks
16
Language
JavaScript
License
—
Category
Last pushed
Mar 12, 2026
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/voice-ai/albirrkarim/react-speech-highlight-demo"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.