Modern, TypeScript-first text-to-speech for the web.
ResponsiveVoice turns text into speech with one small, well-typed API. The same speak() call works with the browser's built-in voices, a hosted multilingual catalog, or premium neural voices from your own provider keys — voice resolution, fallback, chunking, and streaming are handled for you.
- One simple API —
speak(text, voice, options)is most of the surface area. - TypeScript-first — full type definitions, shipped as ESM, CJS, and a browser IIFE.
- Browser-native + cloud — speaks via the Web Speech API out of the box, with hosted voices when you want them.
- Bring your own key (BYOK) — route premium voices from Google Cloud, Microsoft Azure, and OpenAI through the same call, with more providers on the way.
- Streaming — HTTP and WebSocket audio streaming for low-latency playback.
- Free to start — demo mode needs no account, and everything is MIT licensed.
npm install @responsivevoice/coreimport { getResponsiveVoice } from '@responsivevoice/core';
const rv = await getResponsiveVoice({ apiKey: 'YOUR_API_KEY' });
rv.speak('Hello world', 'UK English Female');Prefer a script tag? Drop in the browser bundle from the CDN:
<script src="https://cdn.responsivevoice.org/sdk/latest/responsivevoice.js"></script>
<script>
responsiveVoice.init({ apiKey: 'YOUR_API_KEY' });
responsiveVoice.speak('Hello world', 'UK English Female');
</script>Out of the box, core runs in demo mode and speaks with the browser's default voice — no account required. To unlock the hosted multilingual catalog:
- Register for a free account — a default website is created for you, and its identifier is your API key.
- Initialize core with that key.
- Verify your website's domain in the dashboard so requests from your site are recognized.
You write against a single interface; ResponsiveVoice picks the right engine and gets out of the way.
| Tier | Voices | Needs |
|---|---|---|
| Browser | The device's built-in Web Speech voices | Nothing — works in demo mode |
| Hosted | Multilingual server voice catalog | A free API key |
| Premium (BYOK) | Google Cloud, Microsoft Azure, OpenAI, … | Your own provider key |
Bring your own key and premium neural voices route through the exact same speak() call — no SDK swaps, no per-provider glue code. More providers are on the way.
| Package | Description | Links |
|---|---|---|
| @responsivevoice/core | Browser & Node.js TTS client — start here | npm · repo |
| @responsivevoice/api-client | REST & WebSocket client for the ResponsiveVoice API | npm · repo |
responsivevoice.org · Documentation · npm organization · Examples