TTS text to speech demo by Tim
Posted: Wed Jan 27, 2021 7:27 pm
I made a very simple package that has 2 parts. A trigger will speak every incoming line. A "tts" alias will let you type some things to do extra stuff.
It does not do anything more complicated than that such as let you navigate back and that sort of thing that they're planning to build into the regular program.
It does show off the TTS features that are currently available to LUA scripts though. Someone could improve on this by making something that selects something other than just the last 5 lines, maybe using keyboard shortcuts to roll back a page or something. Just using Lua script I assume you can probably do most of the things that are planned down the line. I'll leave that for someone else if you want to try that. Also it does not filter anything out, so you might have it say "underscore" hundreds of times if your game has some text art.
Here are the available commands, just type "tts", a space, and then one of these commands:
help - list the commands
stop - stop speaking, empty the speech queue
repeat - add the last 5 lines from the screen onto the speech queue
faster or slower - speed can range from 1 to -1, this one just moves 0.25 steps in either direction
louder or softer - volume can range from 0 to 1, moves by 0.25
higher or lower - pitch can go from 1 to -1, moves by 0.25
pause - stops speaking and keeps speech queued up, but if it isn't speaking then pause doesn't do anything
resume - continues after a pause
voice - rotates between available voices
status - tells your current options
On two of my computers, changing the volume and then speaking at the adjusted volume will crash the program. This happens on Raspberry Pi OS on my Pi 4 using mudlet that I compiled myself. It also happens on Debian on my Intel Chromebook using the official release AppImage file. It works fine on 2 Windows 10 machines I tried. Therefore, in order to avoid crashing, I made a thing where you have to confirm that you accept the risk before you can move the volume down from the initial 1.0.
EDIT: I'm removing all the downloads from the rest of the thread and just updating the download on this initial post. The file attached to this has all the updates mentioned in the replies.
It does not do anything more complicated than that such as let you navigate back and that sort of thing that they're planning to build into the regular program.
It does show off the TTS features that are currently available to LUA scripts though. Someone could improve on this by making something that selects something other than just the last 5 lines, maybe using keyboard shortcuts to roll back a page or something. Just using Lua script I assume you can probably do most of the things that are planned down the line. I'll leave that for someone else if you want to try that. Also it does not filter anything out, so you might have it say "underscore" hundreds of times if your game has some text art.
Here are the available commands, just type "tts", a space, and then one of these commands:
help - list the commands
stop - stop speaking, empty the speech queue
repeat - add the last 5 lines from the screen onto the speech queue
faster or slower - speed can range from 1 to -1, this one just moves 0.25 steps in either direction
louder or softer - volume can range from 0 to 1, moves by 0.25
higher or lower - pitch can go from 1 to -1, moves by 0.25
pause - stops speaking and keeps speech queued up, but if it isn't speaking then pause doesn't do anything
resume - continues after a pause
voice - rotates between available voices
status - tells your current options
On two of my computers, changing the volume and then speaking at the adjusted volume will crash the program. This happens on Raspberry Pi OS on my Pi 4 using mudlet that I compiled myself. It also happens on Debian on my Intel Chromebook using the official release AppImage file. It works fine on 2 Windows 10 machines I tried. Therefore, in order to avoid crashing, I made a thing where you have to confirm that you accept the risk before you can move the volume down from the initial 1.0.
EDIT: I'm removing all the downloads from the rest of the thread and just updating the download on this initial post. The file attached to this has all the updates mentioned in the replies.