English forum

Command Line Text To Speech Options

Started by KanawhaCountyWX 5 posts last post 11 months ago

#1

Hello, I'm fairly new to the Linux world. I run an internett radio station, and one of the things I do is run hourly weather forecasts. The data is pulled from the API of the National Weather Service, formatted, and then fed to a TTS program. Currently I'm using Festival for this since it provides the best results of the software I've been able to find.

I've tried Festival, Flite, PicoTTS and eSpeak. My question is: are there any other programs that would run under a Ubuntu install that, when passed correctly formatted text data, could output audio to a file? If I were able to run this script on a Windows machine, I'd likely use Scansoft Tom for this, but my power and internet aren't stable enough to run something like this from my home, so instead speech generation is done on the droplet that runs my station.

~ Xander
Xander (KanawhaCountyWX)

#2

I know of gtts-cli for Google's TTS cloud service, but have not tested it myself.
Steffen

The man with the big fett Bauch, caught in the back of a Knallerbsenstrauch!

#3

Ideally this'd be something ran on the machine. This is a script that fetches weather data and it runs for two stations, so this script runs 48 times per day, twice per hour. I know GTTS-CLI has Error 429 issues with Google.
Xander (KanawhaCountyWX)

#4

spd-say can work with any engine in speech dispatcher (including voxin which has a version of tom). You can also use piper-tts I will look up the code and reply to this post. If you go the piper-tts route, I can clone tom for you.
Grace.

#5

Well from what i could tell spd-say has no way to write audio to a WAV file. I purchased Tom from voxin, and for a while I tried a ChatGPT generated script that had to create a virtual device in pulseaudio and record from it. I ended up reaching out to the Voxin folks to ask if there was a utility like what I was looking for. A week later I got a reply, turns out I'm a dingus and didn't read all of the readme, turns out it includes exactly what I needed. So now my weather script is using Voxin Tom.
Xander (KanawhaCountyWX)