# Browser text-to-speech: hear every voice your browser has built in (https://voicelabs.now/tools/browser-text-to-speech)

> Markdown version of https://voicelabs.now/tools/browser-text-to-speech — the page itself is the canonical copy.

The tester at https://voicelabs.now/tools/browser-text-to-speech lists every voice your browser reports — language, local or remote, default — and plays a sample from any of them. Nothing you type is sent anywhere by the page; a remote voice sends the text to its own speech service.

## Browser TTS in a few lines of JavaScript

No library, key or account. Listen for `voiceschanged`: in Chrome the list is empty until the voices have loaded.

```js
// List the voices this browser reports. The list can start empty and fill in later.
function listVoices() {
  for (const voice of speechSynthesis.getVoices()) {
    const where = voice.localService ? "local" : "remote";
    console.log(voice.name, voice.lang, where, voice.default ? "default" : "");
  }
}
listVoices();
speechSynthesis.addEventListener("voiceschanged", listVoices);

// Speak a sentence, in the first English voice if there is one.
const utterance = new SpeechSynthesisUtterance("Hello from your browser.");
const english = speechSynthesis
  .getVoices()
  .find((voice) => voice.lang.startsWith("en"));
utterance.voice = english ?? null; // null: the browser's default voice
utterance.rate = 1; // 0.1 to 10
utterance.pitch = 1; // 0 to 2
speechSynthesis.speak(utterance);

// Stop speaking and empty the queue.
speechSynthesis.cancel();
```

## Use your own cloned voice in a browser

A page cannot add a voice to the browser, so your own voice arrives as audio: clone it with VoiceLabs, have the API speak the text, and play the result with an <audio> element. Keep the API key on a server. The page explains the limits of browser TTS in full; the API guide is https://voicelabs.now/docs/api.

```js
// app/api/speak/route.ts: runs on your server, so the API key never reaches a browser.
import { VoiceLabs } from "@voicelabs/sdk";

const voicelabs = new VoiceLabs({ apiKey: process.env.VOICELABS_API_KEY! });

export async function POST(request: Request) {
  const { text } = (await request.json()) as { text: string };
  // In a real app, check who is asking and cap the text first.
  const generation = await voicelabs.generateSpeech({
    text,
    voice_name: "My voice", // the name you gave your cloned voice
  });
  // A signed, time-limited link to the audio: a browser can play it without the key.
  return Response.json({ audioUrl: generation.audio_url });
}
```

```js
// In the page, from a click handler.
const response = await fetch("/api/speak", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({ text: "Hello, in my own voice." }),
});
if (!response.ok) throw new Error(`Speech failed with HTTP ${response.status}`);
export const { audioUrl } = await response.json();

const player = document.querySelector("audio"); // an <audio controls> element
player.src = audioUrl;
await player.play();
```

## Questions about browser text-to-speech

### What is browser TTS?

Browser TTS (browser text-to-speech) is speech a web page makes with the voices the browser already has, through the speech synthesis half of the Web Speech API. The page puts the text in a SpeechSynthesisUtterance, picks one of the voices speechSynthesis.getVoices() lists, and calls speechSynthesis.speak(), and the browser reads it out through the device's speakers. Nothing has to be installed, but which voices a visitor hears depends on their browser and device.

### Why are my browser's voices called Microsoft Ana, Eric or Guy?

Because they are Microsoft's voices, and you are most likely using Microsoft Edge. Edge lists Microsoft's online neural voices, with names like "Microsoft Guy Online (Natural) - English (United States)", alongside the voices installed on the device. The Online (Natural) voices are remote: the browser reports them with localService set to false, and the text you play with one is sent to Microsoft's speech service to be spoken. Windows also names its own installed voices after Microsoft, and those run on the device. The tester on this page shows which of your voices are local and which are remote.

### Why is my voice list empty?

Usually because the browser is still loading it. Chrome fills the list after the page loads and announces it with the voiceschanged event, so code that reads speechSynthesis.getVoices() once, too early, gets nothing back; the tester on this page listens for that event. If the list stays empty, the browser has no voices to offer on that device: some systems, Linux desktops without a speech synthesizer among them, report none. A browser without the Web Speech API cannot speak text by itself at all.

### Can I clone my voice so the browser can use it?

Not as a browser voice. A web page can list, choose and speak with the voices the browser reports, but it cannot add one, so a cloned voice can never appear in speechSynthesis.getVoices(). What works instead is to make the speech with a voice-cloning text-to-speech service and play it in the page as ordinary audio, with an audio element or new Audio(url). With VoiceLabs you clone a voice from a 2–30 second recording, in the studio or through the API, and send text to be spoken in it. Clone only a voice you have the right to use.

The API guide: https://voicelabs.now/docs/api
Responsible use: https://voicelabs.now/responsible-use

### Can I download browser TTS as an audio file?

No. The Web Speech API plays speech straight to the device's audio output and gives the page no audio back: speechSynthesis.speak() returns nothing, and the events an utterance fires (start, end, boundary, mark, pause, resume and error) carry no sound. So a page cannot save what a browser voice says as a file. To get a file, the speech has to come from a text-to-speech service that returns audio, the way the VoiceLabs API returns each finished take as an audio file.

### Is browser TTS free?

Yes. The voices come with the browser or the device, and speaking with them needs no API key, no account and no payment. Remote voices do use the network every time they speak. What it costs you is control: you cannot choose which voices your visitors have, and none of them is your own. The VoiceLabs API, which a page uses to speak in a cloned voice, is part of VoiceLabs Pro: US$8 a month or US$59 a year, with a 7-day trial that asks for a card up front.

Pricing: https://voicelabs.now/pricing

VoiceLabs Pro is US$8 a month or US$59 a year, with a 7-day trial: https://voicelabs.now/pricing · All our tools: https://voicelabs.now/tools

Microsoft, Microsoft Edge, Google and Google Chrome are trademarks of their respective owners. VoiceLabs is not affiliated with, endorsed by, or sponsored by either company. Verified 2026-11-08 by the VoiceLabs team.
