Skip to content

Basic Example

The simplest ResponsiveVoice integration — drop in a script tag and speak text. Works without an API key using browser-native voices (demo mode).

<script src="https://cdn.responsivevoice.org/sdk/latest/responsivevoice.js"></script>
<script>
const rv = window.responsiveVoice;
rv.addEventListener('OnReady', () => {
rv.speak('Hello! Welcome to ResponsiveVoice.');
});
rv.init({
// Get a free API key at https://responsivevoice.org/register
// apiKey: 'YOUR_RESPONSIVEVOICE_API_KEY',
});
</script>

Without an API key the library runs in demo mode — it falls back to browser-native Web Speech API voices. Call rv.isDemoMode() at runtime to detect this state (for example, to surface a "Demo Mode" indicator in your UI).