Squiso is a free, powerful automation tool that lets you customize your Twitch stream using simple scripts.
How to Create a TTS (Text-To-Speech) Queue
This script example listens to all cheer messages in chat and automatically adds it into a queue, then when a keyboard shortcut is triggered it plays the oldest message as TTS.
Script Example
import com.squiso.*;
import com.squiso.exception.*;
import com.squiso.scripting.*;
import com.squiso.scripting.data.*;
import com.squiso.keyboard.*;
import com.squiso.twitch.*;
import com.squiso.datatypes.*;
import com.squiso.utils.*;
// Important - Please do not change the row below - otherwise you will get a compilation error!
public class Script_Example extends SquisoScript {
// Create a list of strings as the queue
SquisoList<SquisoString> queue = new SquisoList<>();
@Override
public String registerKeyboardAccelerator() {
return "CTRL+NUMPAD0";
}
@Override
public void onTwitchCheer(OnTwitchCheerData data, API api) throws SquisoException {
SquisoString message = new SquisoString(data.getUserName() + ": " + data.getMessage());
queue.add(message);
api.log("Queue now contains " + queue.size() + " messages.");
}
@Override
public void onKeyboardAccelerator(OnKeyboardAcceleratorData data, API api) throws SquisoException {
if (data.getAccelerator().equals("CTRL+NUMPAD0")) {
// Get the first message in the queue and remove it from the queue
SquisoString nextMessage = queue.remove(0);
// Speak the TTS using Voice "uh04fp6i"
// Fill list of voices can be found here: https://www.squiso.com/voices/
api.speak("uh04fp6i", nextMessage);
}
}
}