Multilingual Text-to-Speech (TTS) app for Twitch on Windows

software developer && gamer passionate about software development && games ... catch my twitch streams on twitch where I stream: https://twitch.tv/techygrrrl
Search for a command to run...

software developer && gamer passionate about software development && games ... catch my twitch streams on twitch where I stream: https://twitch.tv/techygrrrl
No comments yet. Be the first to comment.
About 2 days ago, I learned that you can use web APIs to edit video. In the past, I've used ffmpeg, which is an amazing open-source cross-platform command line tool that pretty much every company uses

If you’ve been reading my blog or watching my Twitch streams you may have already seen me talk about text-to-speech apps. If not, a quick overview: I built a text-to-speech app for Windows using C# and Windows Presentation Framework. You can read ab...

sf6vid is a command line tool that allows you to censor player data in a Street Fighter 6 game play video. How it works sf6vid is a command line tool. In order to use it you need to install it and execute the file from your terminal. In the future th...

I made a user script as a gist for making the Twitch Dev site use dark mode. It should work on all dev.twitch.tv and dev.twitch.com pages at the /docs path. If you find a bug, let me know in the blog or gist comments. https://gist.github.com/techygrr...

Problem Currently, Twitch has both dark and light modes for the UI, but when you go into Theatre Mode, your preference for light mode is ignored and you're forced to use dark mode. Many users find it easier to read in light mode, but the option to vi...

techygrrrl's blog
9 posts
Twitch streamer from Canada. If I'm not playing video games 🕹 I'm probably coding and developing websites or apps 👩🏻💻
I recently bought a Windows computer for streaming and PC gaming. Some games require my full, undivided attention, which means I can't use my eyeballs to read chat. Text-to-speech is a great solution to that problem, allowing me to stay on top of chat while being able to pay attention to the game I'm playing.
This post will go into detail about the Windows app. As of June, I've also built a Mac one—you can read about that in this blog post.
This post will talk about the features of the app, include a demo, I'll talk about why I built it, and finally link to the download.

Automatically supports English, French and Spanish. Username reading is in English, e.g. "techygrrrl says" while the message that follows will have its language autodetected and use a pre-installed voice for English, French or Spanish. If an unsupported language is detected, it falls back to English.
For this to work, you will need to install voices in these languages on Windows 10 or 11. You may also find this list of all available voices useful. While my app doesn't currently support more than these 3 languages, it's relatively low effort to add new languages, so I plan on adding more languages in the future.
The app allows you to choose between 3 read speeds (slow, medium, fast) to hear your messages at a speed that works best for you.
A basic implementation of word replacement is added. Replaces words in both chat messages and usernames. This is useful in the event that default pronunciations are either inaccurate or too verbose. For example, my username sounds terrible in TTS, and this is probably the main driver for me developing this feature.
Chats are read synchronously rather than asynchronously, meaning that in order for a message to begin being read aloud, the previous message is finished being read. This prevents messages from being read on top of each other.
As of February 21, 2022, there is now a feature to add usernames to an ignore list so that all messages from that username are ignored. This feature can be used to ignore your chat bots to avoid noise. So, for example, if I add the username StreamElements, all messages from the StreamElements bot will be skipped and not read aloud by the TTS app.
Here's a demo video of the Multilingual TTS for Twitch app I built. In this video I install it from the zip file that's available for download, and use all the features available at the time of launch.
There are some existing solutions already out there like Twitch TTS on the Microsoft Store and Speech Chat, a website, but these didn't work for me for a number of reasons.
There may be other apps out there but these are the only ones I considered. If you have other app suggestions, feel free to link them in the comments below.
This section will touch on each concern I had with the 2 apps I tried. Feel free to skip this whole section if you don't care about that.
My main concern was with Speech Chat's request for permissions, and unfortunately Twitch permissions are all or nothing.
This is what it looks like when it requests Twitch authorization when you sign up. A bit excessive, in my opinion.

The only permission that's actually needed is the ability to read channel messages, and this can be done anonymously without authentication.
The Multilingual TTS for Twitch app that I built does not ask you to authenticate with Twitch, you just provide any username for the chat you want to listen to.
The official tmi.js library by Twitch allows you to connect anonymously to a channel's chat if all you're doing is reading messages. It's even on the first page of the documentation. Even though the Multilingual TTS for Twitch app that I built is not written in JavaScript, the connection approach my TTS app uses is similar. I had no privacy or security concerns with the Twitch TTS app on the Microsoft store as it uses the tmi.js library with this anonymous connection approach.

Support for other languages is lacking or non-existent. If you look up the term "languages" in the Speech Chat forums, you can see there's some chatter around that any responses don't inspire any amount of confidence that this functionality is working. They appear to have support for voice commands users can do but support does not appear to be automated in any way.
The above-mentioned Twitch TTS app in the Microsoft Store has even less support for languages, and actually appears to make the assumption that all your installed languages would be in the same language as your stream. It cycles through all of the installed languages randomly assigning a new language to a new message. This means that your messages will be read in the language of the randomly-selected voice, likely resulting in the wrong language being used for the message.
My Multilingual TTS for Twitch app automatically detects the language of the message and uses a voice in that language if it exists. Right now it has been fully tested to work with English, French and Spanish with the goal to add more languages.
The Twitch TTS app available in the Microsoft store has an issue that if multiple users send messages, the app begins to read them when they are received, rather than when the previous message has been completed. This causes messages to be read on top of each other, which means you may miss what is said. I'm not a big streamer and I don't have that many chatters at the same time, but I found it hard to follow even 2 messages being read on top of each other. This app would be unusable for people with more active chats than mine.
While I didn't test Speech Chat, I have been to streams where the streamer is using it and it's broadcasting, and I have not noticed these concerns, so I'd say that this concern does not exist with Speech Chat.
This app is built using Visual Studio 2017 and Windows Presentation Foundation (WPF), an XML-based framework for building UI.
It uses the Speech API's System.Speech.Synthesis's SpeechSynthesizer for the bulk of its functionality.
Language detection uses ntextcat.
Download the latest release and see all releases here: https://github.com/techygrrrl/multilang-twitch-tts/releases
TwitchTTSMultilang-techygrrrl.stream.zip file from the link above.zip file you just downloadedsetup.exe file to launch the installerThe demo video linked above demonstrates how to install it.
I am not registered as a developer on Microsoft's platform so if you have trouble installing this app, you may need to change your permissions and either allow installing apps from unknown publishers, or specifically unblock this app.
By default, when you use any TTS app it will be part of your desktop audio, so if you're playing a PC game, you may be streaming your desktop audio, causing you to stream your TTS output. If you don't want to stream your TTS output, you'll need to configure your sound on Windows to multiple output devices and only stream one of them.
These instructions should work for any TTS app, not just mine.
Configuring Windows sound settings for this is fairly complex, here are some articles:
TL;DR:
Listen to this device. Choose Playback through this device (e.g. laptop speakers)After streaming:
Mute microphone icon button (to disable StereoMix input)Before your text stream:
If you decide this isn't for you, you can uninstall the app by going into Add or Remove programs in your Settings, which can be easily accessed by hitting the Windows key and typing "remove" and selecting the right option.
To request new features or vote on other requested features, create a new issue in the issue queue or comment on an existing issue.
Request new features or show your support for existing request at the following link: https://github.com/techygrrrl/multilang-twitch-tts/issues