Examples
Explore working examples that demonstrate ResponsiveVoice capabilities. All examples live in the examples repository.
CDN Examples
Section titled “CDN Examples”Drop a <script> tag on any page — no build step.
Basic Example Minimal TTS with speak, cancel, and events
Extended Usage Example Voice selection, speech controls, and event logging
Web Player Inline pill player with paragraph highlighting, multi-mount, and imperative rv.webPlayer.mount()
Web Player Customization Live control panel for every webPlayer option — theme, controls, navigation, layout, spacing
Voice Selector Side-by-side teacher for the three selector forms — by name, by RegExp pattern, by VoiceQuery
Events & Callbacks Side-by-side view of global events vs per-call callbacks during speech
npm Examples
Section titled “npm Examples”Install @responsivevoice/core from npm and bundle with your tool of choice.
npm + Vite Example ESM import bundled by Vite
Node.js Examples
Section titled “Node.js Examples”Server-side usage — runs in Node.js, not the browser. Uses @responsivevoice/api-client.
CLI Tool Command-line text-to-speech utility
HTTP Server REST API server for TTS synthesis
Running Locally
Section titled “Running Locally”git clone https://github.com/responsivevoice/examples.gitcd examplesnpm installBrowser — CDN examples
Section titled “Browser — CDN examples”npm run serve# open http://localhost:3000/browser/basic/ or /browser/extended/Browser — Vite example
Section titled “Browser — Vite example”npm run vite:dev# open http://localhost:5173/Node.js
Section titled “Node.js”export RESPONSIVEVOICE_API_KEY="your-api-key" # https://app.responsivevoice.orgexport RESPONSIVEVOICE_API_SECRET="your-api-secret" # "Server-to-server API secrets"npm run cli -- "Hello, world!"npm run serverLive Demo
Section titled “Live Demo”Try ResponsiveVoice directly in the app.