Twitch Text to Speech Setup
Setting up TTS takes ten minutes. Most people switch it off again after a week, and it is never the technology's fault.
Text to speech, or TTS, means the computer reads written messages out loud in a voice. On stream it is one of the most popular interactions there is. I built a TTS overlay that produces the voice directly on your own machine instead of fetching it from a provider. Doing that made one thing very clear, and it appears in none of the guides I could find: the setup is the smallest problem.
The three routes, and what they cost
Almost everything in the search results on this topic is a provider recommending itself. There are three builds though, and they differ less in how they sound than in what they depend on.
| Route | How it sounds | What it depends on |
|---|---|---|
| A provider online | usually the best | an account, their servers, their free tier |
| The browser's voice | tinny to usable | which voices the browser has installed |
| A voice on your own PC | good, but only one | a bit of storage, nothing else |
The provider route is the most convenient and has the longest chain. Every spoken message goes to another company, the free tier can run out, and if their service has an incident your feature is gone mid-stream. For streamers in the EU there is the added point that your viewers' messages then travel to an outside processor. That belongs in your privacy policy.
Why the browser voice stays silent in OBS
A lot of guides essentially say: just use the browser's built-in speech, it is free. In ordinary Chrome that is true. Inside OBS it is not.
OBS ships a stripped-down browser, and it generally has no speech voices installed. The program reports no error, the list of available voices is simply empty, and nothing happens. No hint, just silence. Anyone who hits this spends hours looking for the fault in their own setup.
The real reason TTS disappears again
Your chat will find out what the voice will say. That is not malice, that is the whole appeal. And eventually someone shows up who knows exactly which sentence is maximally awkward on a live broadcast, and has it read out. That is the evening TTS gets switched off, and mostly it does not come back.
This is solvable in advance, just not with a single setting. The measures below are ordered by effect, not by effort.
| Measure | Prevents | Costs you |
|---|---|---|
| AutoMod in the Twitch dashboard | the genuinely bad cases | nothing, it runs anyway |
| Points instead of a free command | almost all spam | needs a points system, Twitch reward only with Affiliate |
| Mods only | everything | the feature, for your chat |
| Character limit, around 200 | read-aloud novels | long messages get cut |
| A wait time per person | one viewer on repeat | nothing |
| Capping the queue | backlog after a raid | the overflow is dropped |
| Not reading links | spelled-out addresses | nothing |
The first row is the most important one and is almost never mentioned. AutoMod is the filter Twitch itself provides: it holds a message back before it ever appears in chat. And what never reaches chat cannot be read out by any overlay. A TTS that reads along in chat therefore inherits your moderation settings automatically, without you configuring anything in the overlay. So check first whether AutoMod is switched on for you at all.
A price is the best spam filter
A free !say command is free and gets treated accordingly. The moment being read out costs something, the machine-gun fire stops on its own, without you having to time anyone out. There are two ways to charge for it: a Twitch reward with a text input, available from Affiliate status onwards, or an item in the StreamElements store, which costs your bot's loyalty points and works without Affiliate.
How to create one and what a sensible price looks like is covered in the article on channel points. For read-my-message the usual range is around 1,000 points, roughly an hour of watching.
How my overlay handles it
My TTS overlay produces the voice directly on your machine. The voice itself is a file that sits next to the overlay, much like a font. The spoken message therefore never leaves your computer, and speech keeps working when some provider is having an incident. The voice is called Thorsten, it is German, and it is released under CC0, so public domain and usable without attribution.
Two honest limitations. First, the voice files need around 95 MB of storage sitting next to the overlay. Second, on the very first start a small program library of about 20 KB is still fetched from the internet. If you want no network traffic at all, you can host that yourself. What does not happen: chat text being sent to a speech service.
For protection you can set who may use the command, how long a message may be, how long the same person has to wait, how many messages may queue up at once, whether links get read out, and which bots and users are ignored. What there is NOT is a word list of its own. That is deliberate: maintaining the same list in two places goes wrong, and AutoMod already sits in front of chat and therefore in front of the overlay.
Ten minutes to set up
Download the overlay and leave the folder as it is, because the voice files live inside it. In OBS create a browser source, the source type that displays an HTML file, tick Local file and select the widget.html. In the configuration file config.js you enter your channel name. Setting up a browser source in full is covered in its own guide.
Then test it inside OBS, not in the browser. After that open it to mods only at first, run it for an evening, and then open it to everyone. That order saves you the exact evening this article is about.
Frequently asked
Does the TTS overlay need internet?
For chat yes, that runs over the connection to Twitch. For speech no: the voice sits as a file on your machine. On first start a small program library of about 20 KB is fetched, and that can be hosted yourself.
Why does my TTS say nothing inside OBS?
It is probably running on the browser's voice, and the browser built into OBS has no voices installed. There is no error message, the voice list is simply empty. Switch the configuration to the bundled voice and the overlay brings its own.
Can I stop certain words from being read out?
Yes, but not in the overlay. Use AutoMod in the Twitch dashboard with your own word list. Held messages never reach chat in the first place, and what is not in chat cannot be read out.
Is there an English voice, or other voices?
A German voice ships with it. More can be added, though each one costs another 80 MB or so in the overlay folder. The alternative is the browser's voice, which outside OBS usually covers several languages.
TTS Overlay
View and download this overlay.