> ## Documentation Index
> Fetch the complete documentation index at: https://docs.responsivevoice.org/llms.txt
> Use this file to discover all available pages before exploring further.

# 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).

> [!TIP]
> [Live demo](https://examples.responsivevoice.org/browser/basic/) · [Source code](https://github.com/responsivevoice/examples/tree/main/browser/basic)

## Minimal integration

```html
<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).

## Next Steps

- [Extended Usage Example](/examples/extended) — voice selection, speech controls, event logging
- [npm + Vite Example](/examples/vite) — the same flow via ESM import and a bundler
- [Events Guide](/guides/events) — the full event lifecycle
- [Voice Selection Guide](/guides/voice-selection) — picking voices programmatically
