This was always using an undocumented API, seems that the underlying APIs have changed so this no longer works. The endpoint used to be at https://streamlabs.com/polly/speak, if anyone knows if there's an updated URL feel free to open an issue.
A CLI tool to interact with the StreamLabs Text-To-Speech API endpoint.
Usage: tts [-h] [-v VOICE] [-d FILENAME|-p] <text_to_speak>...
Converts text to speech using the StreamLabs API
Any other positional arguments are interpreted as the text input
If no text is present, reads from STDIN
-h Prints this help message and exits
-v VOICE Change the voice used for TTS
-l List available voices
-d FILENAME Download the .mpeg file to FILENAME.mpeg [default]
-p Instead of downloading, print the audio URL
Disclaimer: Not affiliated with or endorsed by StreamLabs
Download the tts
script somewhere onto your $PATH
wget -P ~/.local/bin 'https://raw.githubusercontent.com/purarue/tts/master/tts' && chmod +x ~/.local/bin/tts
Could also use basher
:
basher install purarue/tts
tts -l # to list voices
# basic examples
echo "hello mr streamer" | tts
tts 'O, o. .O, o.'
tts -v Emma 'what?' # use a different voice
# save to filepath, and play after its downloaded. uses paplay, but mpv/vlc could also be used
echo 'Does this work? NO? .OK.' | tts -d /tmp/sound.mpeg && plaympeg /tmp/sound.mpeg
Audio: https://purarue.xyz/p/sound.mpeg
Converted to a nicer interface from the one liner found here.
Disclaimer: Not affiliated with or endorsed by StreamLabs