Browser and Node.js examples for the @responsivevoice/core and @responsivevoice/api-client packages.
Tip
Get a free API key at responsivevoice.org/register — required to access all available voices (standard and premium) in browser demos, and required outright for the Node.js examples.
| Example | Description |
|---|---|
| basic | Minimal TTS — speak text with default voice (loads from CDN) |
| extended | Voice selection, playback controls, and event logging (loads from CDN) |
| vite | @responsivevoice/core installed from npm and bundled by Vite — the modern web-app path |
# Serve the static CDN examples locally
npm install
npm run serve
# Open http://localhost:3000/browser/basic/ or /browser/extended/# Run the npm + Vite example (bundled)
npm install
npm run vite:dev
# Open http://localhost:5173npm install
# CLI example
npm run cli -- "Hello, world!"
# Server example
npm run server
# Visit http://localhost:3001Every browser demo includes an in-page acquisition callout and a Paste your API key input — no source edits required. The pasted key persists in localStorage and is reused across all demos on the same site. An optional Advanced settings disclosure lets you override the TTS server URL when needed.
Examples use
npmscripts; substituteyarn(e.g.yarn,yarn serve) if you prefer.
Full documentation at docs.responsivevoice.org.
MIT