top of page
  • Writer's pictureEddie

Autonomous TTS with Alexa

Here is how I got Alexa to announce information (text to speech) to me without asking her. You may be thinking why having Alexa (Amazon Echo) announce messages when no one is asking her?

It can be very useful, imagine that every-time someone opens an exterior door, your Alexa devices let you know 'Main door open', or if the kids switch of the video console, Alexa can let you know as soon as it happens.

A while back came across this blog entry from Lotzimmer, I thought it was brilliant and very simple to setup, at least if you are using a Linux system for your Home Automation. You can find it here:

I highly recommend you to go through the original blog post above, as there're lots more options. I just focussed on getting Alexa to work a bit like "Simon says".

1.- Download this .sh script, you will need a Linux system like a Raspberry Pi:

2.- Have a look at the code and make sure you are comfortable with what it is doing. for your interest, it is doing a CURL and JSON parsing to use the new announcing feature for Alexa

3.- Edit the file with your favourite text editor and enter your username and password you use for your Alexa account. On command line you can use:


4.- You may want to change the language Alexa speaks, the URL and the name for it, you can find this logging on your Alexa account, for example if from the UK, this would be: and

5.- If you are not sure, log into your Alexa Amazon domain and use these. You can also check the language your devices are set to.

6.- Scroll to Language, whatever language you have there, is the one you have to setup on the file too. (otherwise Alexa will have a terrible time synthesising your phrases!)

To make it easier I have listed here the options:

en-US = English (United States)

en-GB = English (United Kingdom)

de-DE = Deutsch

ja-JP = 日本語

en-IN = English (India)

en-CA = English (Canada)

en-AU = English (Australia/New Zealand)

fr-CA = Français (Canada) Version préliminaire

fr-FR = Français (France)

it-IT = Italiano (Italia)

es-ES = Español (España)

es-MX = Español (México)

7.- Install JQ, you can find it here: or on command line just type:

sudo apt-get install jq

8.- Type on command line ./ -a , this will show all your devices connected to your Alexa account. It should look something like this:

9.- Now is the interesting part, just type ./ -d Kitchen -e speak:'Hello, I can talk now'

-d is for the device you want to use for TTS

-e speak: is the phrase you want to synthesise, make sure there's no space between the : and the 'for the phrase, all together.

That is it, the hardest part is done. Now you can use it from your own system. Below is an example of how I use it with Domoticz to announce when someone opens the main door:

For more information about this really useful script, please visit

2,252 views2 comments

Recent Posts

See All


Eddie Machinon
Eddie Machinon
Jan 19, 2019

Hello Marcel, I use that one too, but means I have to have some speaker system on that room. For the ones I don't have but I have an Alexa I use the above.

That said, you are right, the local one with izSynth is a bit faster. I also used mpg321 for playing pre-recorded messages (that was the fastest!)


Marcel de Jong
Marcel de Jong
Jan 19, 2019

I am using a local solution with:

it announces when I arrive at and leave my workplace, when it is time for the kids to leave for school and wishes me a pleasant time when I start Netflix.

It also gives feedback when a specific scène is started automaticly of manual

bottom of page