I'm a tinkerer, I love to play. SmartThings is great for that. What's missing? The ability to say "Garage Door Open", or "Amy Has Arrived Home" simply, from any app, and cheap.
My search for the best TTS solution brought me to many lands, and back from some, some were good.
The day I discovered Amazon Polly's "Joanna" voice, I knew THAT should be the voice of my home. So I created RenoTTS. Well, a hacked together version, and I've been using it for almost a year on RasPi's and NextThing C.H.I.P.'s plugged into cheap Amazon Basics speakers throughout my home. Total cost: ~$30 for a C.H.I.P. setup and guess what? It's been rock solid.
My requirements were simple. I wanted something that could be up and running in a matter of minutes, utilize any of the Polly voices, and most importantly... not fail to speak! For that reason the solution needed to have redundancy baked in.
I built RenoTTS to meet these requirements. I really wanted to provide a solid TTS solution for SmartThings that was simple and easy enough to configure that most people could do it without 'too much' hassle. I also wanted it to 'just work', I don't want to configure speakers on a regular basis, or figure out why we're not speaking today. I just want to set them up and have them work reliably. THAT is RenoTTS.
Step 1: If you haven't already done so, set up an account with AWS. Don't worry, it's free for the first year.
Step 2: Navigate to Amazon IAm and log in if needed.
Step 3: Select 'Groups' from the left column, then click 'Create New Group'.
Step 4: Give your group a name (E.G. RenoTTS), then click 'Next Step' in the bottom right corner.
Step 5: Place a check mark next to the "AmazonPollyReadOnlyAccess" policy for this group, then
click 'Next Step'.
(It helps to type the word 'polly' in the filter box so you don't have to scroll
through the entire list.)
Step 6: Review and create this group.
Step 7: Select 'Users' from the left column, then click 'Add User'.
Step 8: Give the User a name (E.G. RenoTTSUser), then check the box for "Access type, Programmatic access". Click 'Next:Permissions'
Step 9: On the permissions page, check the box next to the group we created previously, then press 'Next:Review'
Step 10: On the review page, select 'Create User'. You will be brought to a page that shows the user and access keys. Keep this page handy in your browser.
Step 1: Create the proper directory.
mkdir ~/.aws
Step 3: Create the credentials file (1 of 2) and paste in the following: Note: If you wish to create a custom profile just for Polly (aside from default), do so by ensuring the profile exists in both credentials and config, then change the aws-config-profile setting in ~/.renotts/renotts.toml.
nano ~/.aws/credentials
[default]
aws_access_key_id = |Your Access Key ID, See Above|
aws_secret_access_key = |Your Secret Access Key, See Above|
Step 4: Determine your region by looking at this chart: Select Closest
Step 5: Create the config file (2 of 2) and paste in the following:
nano ~/.aws/config
[default]
region=|your region, E.G. us-west-2|
output=json
Step 1: Decide where to store the file. Note: While you can store the server in /usr/bin or /bin, it's simpler to just plop it into your home directory. Don't worry, you can still start on boot!
mkdir ~/renoTTS
cd ~/renoTTS
Step 2: Install the dependancies.
sudo apt-get update && sudo apt-get install -y portaudio19-dev libmpg123-dev
Step 3: Determine the proper download for your system architecture.
Step 4: Download and extract the files.
wget http://download.renotts.com/renotts.<version>.<arch>.tar.gz
tar -xvzf renotts.<version>.<arch>.tar.gz
Step 5: Make executable, then run the server.
sudo chmod +x renotts
./renotts
RenoTTS: * found required AWS config file: /home/dustin/.aws/config
RenoTTS: * found required AWS config file: /home/dustin/.aws/credentials
RenoTTS: * RenoTTS Configuration file loaded: /home/dustin/.renotts/renotts.toml
RenoTTS: * execPlayer not set, will play files internally
RenoTTS: * Instructions/Options: visit http://192.168.1.70:46093 in a browser.
Configuration now lives in the .renotts folder in your home directory.
Visit the URI provided in
a browser to check config, test the server, and get detailed boot configuration instructions.
Step 6: That's the simple bare-bones setup. You're ready to set up SmartThings.
If you wish to configure other options, please locate the renotts.toml configuration file in the folder
.renotts in your home directory.
This file was automatically generated when the server started.
Step 1: Navigate to the SmartThings IDE. Log in, select 'My Locations', then click the name of your hub.
Step 2: Select 'My Device Handlers'.
Step 3: If you haven't already done so, enable github integration by following the official instructions: Enable Github Integration.
Step 4: Press 'Settings' in the upper right corner.
Step 5: In the window that pops up, select 'Add New Repository'. In the 3 boxes, type the following (case sensitive), then press 'Save':
Owner:Dustinmj
Name:SmartThings-RenoTTS
Branch:master
Step 6: Select 'Update From Repo' and choose 'SmartThings-RenoTTS-Handler (master)', click the box labeled 'Publish', then press 'Execute Update'.
Step 7: Your device handler should be installed. Proceed to installing the app.
Step 1: Navigate to the SmartThings IDE. Log in, select 'My Locations', then click the name of your hub.
Step 2: Select 'My SmartApps', then press 'Settings' in the upper right corner.
Step 3: In the window that pops up, select 'Add New Repository'. In the 3 boxes, type the following (case sensitive), then press 'Save':
Owner:Dustinmj
Name:SmartThings-RenoTTS
Branch:master
Step 4: Select 'Update From Repo' and choose 'SmartThings-RenoTTS-Connect (master)', click the box labeled 'Publish', then press 'Execute Update'.
Step 5: Your 'SmartApp' should be installed. You're ready to go!
Step 1: From the SmartThings mobile application, click Automation>SmartApps>Add a SmartApp.
Step 2: Navigate to the bottom of the list and choose '+My Apps'.
Step 3: Find RenoTTSConnector and follow the instructions. The app will locate and install your RenoTTS servers.
Step 1: This assumes you already have a Go environment configured.
Step 2: Install the dependancies.sudo apt-get update && sudo apt-get install -y portaudio19-dev libmpg123-dev
Step 3: Get the repo and Go dependancies (this may take a few minutes)
go get github.com/dustinmj/renotts
Step 4: Build it
go build github.com/dustinmj/renotts
Step 5: The renotts binary will be created in the current directory.