How to get your TTS to respond appropriately to blank messages

With TTS you can easily let your viewers say something. Streamers often use it in connection with subs and bits.
But what if the viewer doesn’t want to say anything? Does TTS then simply remain mute?

This is where computers and humans collide. Of course, you have stored the corresponding variable and the variable wants to say what you have given it. If the spectator does not leave a text, the variable tries to execute a standard text.

This may not sound appropriate or nice.

But don’t worry, there is of course a solution for this too.

We know that the variable {{message}} is used to transmit the sender’s message. Now we use a little trick so the message can never be empty.

To do this, go to Variables in the left sidebar. Now click on Add Variable.
Give the variable a name such as sub_thanks. Under Value we enter Thank you {{username}} for your sub.
Now click Refresh

Now go to AlertsTwitchSubscriber
Scroll down a little until the TTS options appear. There we now enter {{message= {{sub_thanks}}}} in the Message template. And click Refresh

Please pay attention to the number of curly brackets. Variables are case-sensitive.

And that brings us to the end.

If a viewer subscribes and leaves a message, this message will be read out.
If he does not leave a message, then TTS reads the sentence Thank you (name of subscriber) for the sub.

Of course, this also works with the Chat Bot in the same procedure.