wkellen
Posts: 6
Joined: Thu Dec 27, 2012 2:56 pm

Make Alexa speak

Thu Sep 12, 2019 7:30 pm

I have searched everywhere and can only find the reverse of what I want. It always shows controlling the rpi with an Alexa, but not Alexa with a rpi.

Basically what I want is to send a command to all of my Alexa's to speak a phrase when an input to the rpi gpio happens.

For instance, when GPIO 10 goes to HIGH, broadcast to all alexas "Attention! The trigger has been tripped!"

Can someone point me in the right direction?

Thanks!

Andyroo
Posts: 4231
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Make Alexa speak

Thu Sep 12, 2019 7:35 pm

This may help https://developer.amazon.com/docs/alexa ... rview.html

No idea if the Pi has a toolkit / code examples for this though.
Need Pi spray - these things are breeding in my house...

flipontheradio
Posts: 10
Joined: Tue Jul 23, 2019 3:37 pm

Re: Make Alexa speak

Thu Sep 12, 2019 8:29 pm

You might be able to accomplish this if you have a home automation hub like Smartthings. I know you can have sensors setup that will trigger routines with Alexa where you can have her say just about anything. All my doors trigger multiple echo's in my house when they are opened, i.e. Alexa will say "Garage door is open", "Front door is open", etc. If you can create a virtual switch that gets triggered and it reports to your hub you could potentially create a routine so Alexa will say whatever you want.

https://www.amazon.com/gp/help/customer ... G202200080

User avatar
neilgl
Posts: 819
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Make Alexa speak

Thu Sep 12, 2019 8:35 pm

An easy way is to install openhab2 on your pi, then the Alexa binding.
You can then get Alexa to say anything you want using Alexa_TTS.
Add a rule in openhab2 that looks at GPIO, then get Alexa to speak. That's what I do.

wkellen
Posts: 6
Joined: Thu Dec 27, 2012 2:56 pm

Re: Make Alexa speak

Sat Sep 14, 2019 12:25 am

All of the responses were great ways to achieve what I want. I really was looking for a dumbed down way. I found this to be very helpful.
https://community.home-assistant.io/t/a ... /52067/243

With it I was able to actually create 2 bash script files that made it speak from typing in a terminal. Now I can have the triggered GPIO execute the script without all the extra software.

flipontheradio
Posts: 10
Joined: Tue Jul 23, 2019 3:37 pm

Re: Make Alexa speak

Sat Sep 14, 2019 12:59 am

Thanks for posting that you found a solution! I might try to integrate this with Blue Iris to get a verbal notification if motion is detected on a camera.

User avatar
neilgl
Posts: 819
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Make Alexa speak

Sun Sep 15, 2019 10:28 am

Hang on a second, that link is using Home Assistant / hassio (all that extra software?)

flipontheradio
Posts: 10
Joined: Tue Jul 23, 2019 3:37 pm

Re: Make Alexa speak

Mon Sep 16, 2019 5:14 am

The link gives details on writing a shell script to execute a curl request to Amazon's api to make an Alexa device speak which is the solution the OP was referring to. It also gives details on executing the script within home assistant which is why it's on that forum.

wkellen
Posts: 6
Joined: Thu Dec 27, 2012 2:56 pm

Re: Make Alexa speak

Wed Sep 18, 2019 10:55 pm

No problem. I hate when a topic just stops and nobody knows what the solution was.

Yes, and yes.

I will note that there is a volume level in one of the files that was set to 30. I could barely hear it. I changed that to 100 and it was loud and clear.

I ended up with 2 script files and no home automation software was installed.

User avatar
neilgl
Posts: 819
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Make Alexa speak

Thu Sep 19, 2019 12:39 pm

OK but what two scripts are they?

Return to “General discussion”