Add text to speech to your website

Give your readers a Listen to this article button. It reads the article aloud right on your page, with no app or plugin for them to install.

How it works

  1. Create a free account and add your website's domain.
  2. Copy the two lines of code it gives you into your article template, where you want the button.
  3. Readers press the button and hear the article. The first listen of each article creates the audio; everyone after that gets it instantly.

The code

<div data-ttsmp3-player></div>
<script src="https://www.ttsmp3.ca/assets/embed.js"
        data-key="YOUR_PLAYER_KEY"
        data-lang="english"
        data-target="article" async></script>

Options

AttributeWhat it does
data-keyYour player key, from your account page. Required.
data-langThe article's language, for example english, french or arabic. The slug is the last part of each language page's address.
data-targetA CSS selector for the article text. Defaults to article. Use something like .post-body if your theme is different.
data-voiceOptional. A voice id from /api/voices?lang=english.
data-labelOptional. Button text, such as "Écouter l'article".

To skip parts of the page (captions, ads, "related posts"), add data-ttsmp3-skip to those elements.

WordPress

Paste the code into a Custom HTML block at the top of your post template, or into your theme's single.php just above the content.

Usage

Each account includes a monthly number of characters for the player. Only the first listen of an article counts. See pricing.