Opens in a new tab

Web design

Text to speech for your website: how to add an audio version

How to add text to speech to a website: browser voice or audio file, why audio shouldn’t autoplay, how to load it on play and how to check it.

CheckedNovember 4, 2026
Reading time
Part ofWeb design
Listen to this guide
0:00 /5:26

Short answer: Text to speech lets visitors listen to a page instead of reading it. The browser can read the text with its own voice, or you can generate an audio file and add a player. Either way, start the audio only when the visitor presses play, and load the file only then.

What text to speech on a website means

Text to speech turns written text into spoken audio, so visitors can listen to a page instead of reading it.

The browser can do it on its own. MDN describes the SpeechSynthesis interface of the Web Speech API as the controller for the speech service: it can list the voices available on the device and start and pause speech.

The other route is an audio file. You generate the audio once, host it and play it with the HTML audio element, which MDN says embeds sound content in a page. With its controls attribute, the browser shows volume, seeking and pause controls.

What changes Browser voice Audio file
Where the voice comes from The voices available on the visitor’s device A file you generate once and host
The same voice for every visitor No, it depends on the device Yes
What the visitor downloads No audio file The file, which can wait until they press play
Checking the pronunciation Only on the devices you test Once, before you publish

Based on MDN’s pages on the audio element and the SpeechSynthesis interface, read November 4, 2026.

Let visitors start the audio

MDN warns that sites that play audio automatically can be an unpleasant experience, and that they should avoid it when possible. If you must offer autoplay, it says to make it opt-in.

Browsers enforce much of this. Chrome always allows muted autoplay, but it allows autoplay with sound only in some cases, such as after the visitor has clicked or tapped on the site.

Accessibility guidance agrees. WCAG asks that any audio that plays automatically for more than 3 seconds can be paused or stopped, or has its own volume control. W3C encourages starting sound only by an action of the visitor.

How to add an audio version to a page

  1. Choose between the browser’s voice and an audio file you generate.
  2. Make the audio from the final text, after the last edit.
  3. List the names, acronyms, numbers and times the voice may misread, and spell them out in the spoken text.
  4. Listen to the result, or transcribe it back and compare it with the page.
  5. Add a player with play, pause, position and speed controls.
  6. Load the audio file only when the visitor presses play.
  7. Keep the full text on the page as the transcript.

Our website accessibility checker guide covers how to test the rest of the page, and our lazy loading guide covers the same load-when-needed idea for images.

How we add audio to our guides

At 1:37 PM on November 4, 2026, 172 of our 173 published guides in each language had an audio version. We make each one from the final text with a text-to-speech voice, one MP3 per language.

The English files last between 4 and 16 minutes, with a median of about 5 and a half. The Spanish version is longer in all 172 pairs, typically by 17%. At 64 kbps, the median file weighs 2.59 MB in English and 3.05 MB in Spanish.

Our player doesn’t ask for the MP3 when the page opens: it adds the file the first time a visitor presses play. We tested it in a browser on one guide in each language: the page made no request for the audio file until we pressed play, and one when we did.

Before publishing, we transcribe the audio back and compare it with the text. In one Spanish guide, that showed the voice reading “200 un segundo” as 201, so we changed how that phrase is spoken.

Before you add audio to a page

  • The audio starts only when the visitor presses play.
  • The file loads only then.
  • The player has pause, position and speed controls.
  • The voice says names, numbers and acronyms right.
  • The audio matches the final text.
  • The full text stays on the page.

RememberAudio is something a visitor chooses. Don’t start it on its own, and don’t make visitors download it before they press play.

Audio versions like these are part of our web design service.

Quick answers about text to speech on a website

How do I add text to speech to my website?

Let the visitor’s browser read the text with the Web Speech API, or generate an audio file and play it with the HTML audio element and a play button. In both cases, start the audio only when the visitor presses play.

Should audio play automatically on a website?

No. MDN says sites that play audio on their own can be unpleasant and should avoid it when possible. Chrome allows autoplay with sound only in some cases, such as after the visitor has clicked or tapped on the site.

Does an audio version slow down a page?

Not if the file loads only when the visitor presses play. The audio element’s preload attribute, set to none, tells the browser not to preload the audio. Our player goes further and adds the file on the first click.

Does a browser voice sound the same for everyone?

No. The Web Speech API works with the voices available on the visitor’s device, so the voice changes from one device to another. An audio file you generate sounds the same for every visitor.

Do I still need the text if a page has audio?

Yes. MDN says audio with spoken dialog should come with transcripts that describe its content accurately, and the page text works as one. It also lets visitors skim the page and find the part they need.

Sources

Read on November 4, 2026. MDN: <audio> HTML embed audio element and SpeechSynthesis. Chrome for Developers: Autoplay policy in Chrome. W3C: Understanding SC 1.4.2. Our case: the audio versions of our published guides and a browser test of our player, on November 4, 2026.

Pedro Galindez

Pedro Galindez

Founder of Feedback Studios, a bilingual growth studio in Miami.

Listen0:00 /5:26

More guides

Checked November 4, 2026

Online booking page: what to set up so customers book appointments on your website

What a booking page does, the settings that keep your calendar under control, how to keep the form short and how to set one up.

Checked November 4, 2026

Third-party cookies: what they are and how each browser treats them

What third-party cookies are, what Chrome, Firefox, Safari and Edge do with them, what Google decided for Chrome and the cookies our own site sets.

Checked November 4, 2026

What is a domain name? How to choose one for your business

What a domain name is and its parts, how to choose one, what Google says about keywords and endings, and how to plan it for more languages.

Checked November 4, 2026

Reserve with Google: how to add a booking button to your Business Profile

How to add booking to your Google Business Profile with a Reserve with Google provider or your own link, and what Google checks in the link.

Checked November 4, 2026

Content hub: what it is and how to build one for your website

What a content hub is, how it compares with pillar pages and topic clusters, why links between your pages matter to Google and how to build one.

Next step

Tell us what you need

Write to us on WhatsApp or send us a message. We answer in English or Spanish.