I’m ashamed to say that though I’ve been lurking here for years, this will be my first post. I’ve been working on this project for some time, and could use some testers/tinkerers to help me locate any remaining bugs.
RenoTTS is a single binary server written entirely in Go. It acts as an intermediary for AWS’s Polly TTS Engine. It creates a REST server on a SBC such as NextThings C.H.I.P. or Raspberry Pi (I’ve been testing heavily on C.H.I.P. and Pi 3 B+). It can also be run on almost any linux build (though I’ve only compiled for ARMv7l and AMD64 for this beta)
The application itself handles:
All Communication with AWS
Download and caching of files
Playback of files
UPNP discoverability
Server setup and configuration
Boot configuration
Provides test tools
Additionally, I’ve created a connector SmartApp as well as a Device Handler for RenoTTS. Obviously these handle connection to the server(s) as well as the ability to:
Use RenoTTS as a variety of different media device types including ‘Speech Synthesis’ and ‘Music Player’
Speak via TTS from various SmartApps
Choose Voice (AWS Polly voices are quality voices)
Change voice at any time
Change sample rate
Adjust silence padding options
AWS Polly has a free tier that is very generous, after that’s over it’s literally pennies for what we’re trying to accomplish ($4.00 for 1 million characters). Since RenoTTS caches queries, there’s a very good chance you’ll cache all the TTS speech you need during the free tier and not have to pay a dime. For instance: ‘Garage Door Opened’ or ‘Amy has Arrived Home’ must only be downloaded once per server, per voice. Honestly, in all my testing and usage, I’ve paid nothing.
Please see https://renotts.com for much more information, as well as installation instructions.
RenoTTS just speaks through the audio output, so while I haven’t tried it… connecting a Pi to Alexa or similar via Bluetooth should work just fine assuming the configuration between the two devices is set up correctly.
Honestly, I tend to see the Bluetooth connection as another failure point. I’m currently using Amazon Basics speakers which run about $20/ea plugged in directly to both C.H.I.P. and Pi 3 B.
Agreed, introducing BT is another point of failure, and not what I had in mind…
I was wondering if the “AWS services” could be utilized to directly address the Echo speaker via the web.
Was thinking along the lines of the Android UBI app
The app must be running on a server, taking voice input & sending it to Amazon that then sends the output/result to the Echo
Can you not do something similar; you are already running a server that can send pre-recorded voice strings for Amazon to react on?
Just thinking out loud; I really have no idea how it all stitches together in the background.
Thanks
J
1 Like
bamarayne
(Jason "The Enabler" as deemed so by @Smart)
6
We still can not wake up an Alexa device programmatically, it must be done via voice.
The app above, like the others, allowed you to talk to aws via your phone or tablet and receive a spoken response. It does not push your voice text to a device.
Hi, I’m pretty sure @bamarayne is correct… and AVS requires initiation by the user under all circumstances. Even so, it’s pretty far outside of the scope of this particular project. I do agree it would be pretty nice to have that capability, though.
I’m happy to report that I’ve made substantial progress on bug fixes this week in the RenoTTS binary, handler, and connector app. The most substantial of which is significantly improved playback performance on the Raspberry Pi.
Additionally, added support for Audio Notification and Notification capabilities, as well as cleaned up and fixed some of the Music Player capability issues.
Hi Dustin, I tried to install this today. Everything appeared to go smoothly until I tried to run it. I’m running on a Raspberry Pi Zero W with a fresh install of raspian. Here is my error:
pi@raspberrypi:~/renoTTS $ ./renotts
RenoTTS: * found required AWS config file: /home/pi/.aws/config
RenoTTS: * found required AWS config file: /home/pi/.aws/credentials
RenoTTS: * RenoTTS Configuration file loaded: /home/pi/.renotts/renotts.toml
RenoTTS: * execPlayer not set, will play files internally
panic: runtime error: index out of range
Hi Jeff, That’s definitely an issue. Thank you for reporting!
I’m on the road right now so likely won’t have time to investigate until tomorrow. Hang tight! I’ll let you know when I figure out why it’s throwing that error.
Great job, just installed it. Polly is really one of the best TTS engines, very natural and supports multiple languages which is important to my setup.
Please, can you clarify if you support variables or how can we further explore the text messages RenoTTS will process/read out?
For example, when ST detects motion early morning in the house, I would like it to greet with a “good morning” message added with the forecast, etc. It would sound like "Good morning “FamilyName”, today is “Weekday”, outside temperature is "XX"C. I do that today using IFTTT to Dropbox text to Hazel with Talk scripts in a Mac, but with RenoTTS I would like to migrate all to my Raspberry Pi 3.
This is just an example, but can you clarify what variables or customizations can we use with RenoTTS?
Hi, thanks! I actually do something similar to your good morning message in the living room. I use only the name of the person so as to cache the sound. The logic I do in webcore/core.
For a while I had IFTTT sending maker requests to core at specific times to update the weather, but since I migrated to webcore I’ve been using the webcore provided data, which seems more accurate in our area.
Our bedroom morning routine greets based on the time of day, with specific reminders tailored to each of us (eg take out the trash for me), as well as current weather and a full forecast. This is all done in webcore.
Another thing to think about is cost associated when speaking non repetitive messages. Renotts caches speech so as long as it’s the same e.g. “garage door was opened” or “good morning Dustin” is a single query, it won’t have to query AWS again. If you add in temp you’re looking at a cached request for each temperature, still not bad. Add in a weather report and you’ll likely query AWS daily. Our morning routine i mentioned runs through our one and only Sonos for this reason while we have RenoTTS setups sprinkled throughout the house for various notifications, most of which are repetitive at least on some level.