Alexa text to speech Topic is solved

Alexa, Google Home and Siri

Moderator: leecollings

salopette
Posts: 187
Joined: Tuesday 07 March 2017 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Germany
Contact:

Re: Alexa text to speech

Post by salopette »

i nideI need DE Account
Bradds
Posts: 23
Joined: Wednesday 22 March 2017 22:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Alexa text to speech

Post by Bradds »

Hi All

For people having cookie/captcha issues on headless systems, you could try https://github.com/jonferreira/node-red ... exa-remote
This node (for node-red) allows you to send speech to alexa and works fine.

To fill in the cookie window in the node config, do the following.

Connect to your alexa web page.
right click somewhere on the page and click inspect.
Click on the network tab.
Press f5
pick one of the name in the list
click on the header tab
scroll down to cookie ( if you do not see it click on another name)
copy all what is in here and paste it in the cookie section of the node-red node.
( note host : alexa.amazon.com (or whatever country link you use) and paste it to ''amazon page '' field of the node-red node
manutremo
Posts: 67
Joined: Saturday 19 November 2016 17:02
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Alexa text to speech

Post by manutremo »

Hi,

Just installed the script - wow great job. In my case I'm using spanish alexa at alexa.amazon.es. Everything seems to be working fine regarding launching the script, but whatever I ask it to say, alexa always says (in spanish) "Sorry I can't find an answer to your question".

If however I make her speak something like "Alexa connect bluetooth" she will respond as if I had given the order by talking.

In summary she seems to be taking the phrase after the -e speak: command as an order instead of as something she could just convert into speech and repeat.

My settings are:

LANGUAGE='es-ES'
AMAZON='amazon.es'
ALEXA='alexa.amazon.es'

Any idea?
dadogiobbe
Posts: 3
Joined: Friday 23 May 2014 19:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Alexa text to speech

Post by dadogiobbe »

the same here in italy...it looks like an order...
johansson
Posts: 75
Joined: Sunday 27 September 2015 15:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Finland
Contact:

Re: Alexa text to speech

Post by johansson »

Great approach, would be perfect for e.g. temperature alerts or so. After a bit of fiddling the login issues were tackled and everything seems to in order, but the sound is missing.

When I do e.g.:

Code: Select all

sudo ./alexa_remote.sh -d Echo -e speak:'Test'
I get as an output:

Code: Select all

sending cmd:speak:Test to dev:ALL type:XXX serial:XXX customerid:
Sequence command: Alexa.Speak
{"message":null}
But no sound from any of my devices! Any ideas and/or advice how to solve this? Same applies to traffic announcements, TuneIn radio and so forth.
johansson
Posts: 75
Joined: Sunday 27 September 2015 15:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Finland
Contact:

Re: Alexa text to speech

Post by johansson »

Solved. It was a cookie/login/whatever issue anyway: I used an extension called cookies.txt to copy the cookie into /tmp/alexa.cookie and now it's suddenly working.
darrepac
Posts: 133
Joined: Tuesday 04 February 2014 21:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Isère, France
Contact:

Re: Alexa text to speech

Post by darrepac »

johansson wrote: Friday 04 January 2019 21:40 Great approach, would be perfect for e.g. temperature alerts or so. After a bit of fiddling the login issues were tackled and everything seems to in order, but the sound is missing.

When I do e.g.:

Code: Select all

sudo ./alexa_remote.sh -d Echo -e speak:'Test'
I get as an output:

Code: Select all

sending cmd:speak:Test to dev:ALL type:XXX serial:XXX customerid:
Sequence command: Alexa.Speak
{"message":null}
But no sound from any of my devices! Any ideas and/or advice how to solve this? Same applies to traffic announcements, TuneIn radio and so forth.
I got the same when I was using a cookie from Chrome, once I used a cookie from Firefox, everything worked!
satanasinc
Posts: 41
Joined: Monday 19 October 2015 12:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Spain
Contact:

Re: Alexa text to speech

Post by satanasinc »

Hi!

It works perfect in Spanish in my raspberry pi.

Thanx for share your workwithus. It’s great!

Greetings from Spain.
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: Alexa text to speech

Post by freijn »

I still have the problem that cookies expire after a while ( something like 2 weeks ? )

Anybody found this as well and know a solution?

Very unreliable announcements from Alexa :-(
User avatar
EdddieN
Posts: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

Re: Alexa text to speech

Post by EdddieN »

Anyone managed to get all the Alexa devices to speak at once?

From the documentation this should work:

Code: Select all

./alexa_remote_control.sh -d ALL -e speak:'hello'
Also changing the volume before speaking?
11101101 - www.machinon.com
nigels0
Posts: 221
Joined: Thursday 23 January 2014 12:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Alexa text to speech

Post by nigels0 »

I get them speaking in sequence, but timeout after 3 or 4 of them (I have about 10 devices around). Your options are correct
User avatar
EdddieN
Posts: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

Re: Alexa text to speech

Post by EdddieN »

Same line? -d ALL ?
11101101 - www.machinon.com
User avatar
philchillbill
Posts: 396
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Alexa text to speech

Post by philchillbill »

In the Alexa app you can setup 'routines' that can be triggered either by a custom voice command or by a smart home event. The result can be another smart home event or it can be a TTS action from Alexa (and these ones don't need cookies). There's an option to have it spoken from any of your echos. Might be worth checking out for people currently trying the Loetzimmer script and struggling.

They only work for devices correctly exposed as being of type CONTACT_SENSOR or MOTION_SENSOR and that proactively report state-changes. HA-Bridge exposes everything as a dimmable light as it fakes Philips Hue, so it won't work with HA-Bridge.
Last edited by philchillbill on Thursday 17 January 2019 9:29, edited 1 time in total.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
User avatar
EdddieN
Posts: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

Re: Alexa text to speech

Post by EdddieN »

Thanks

Yes I got HA working fine. It is more I like to anoche things in all of the Alexa via the TTS. I got it working for individual ones but when I use the -d ALL does not seem to work, however the script runs ok.
11101101 - www.machinon.com
sion
Posts: 113
Joined: Friday 08 January 2016 12:32
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Alexa text to speech

Post by sion »

Just wondering if people have this working reliably?

I worked for me for ages at the start.
Then stopped.
I tryed enabling 2 step, and put the code in the the script for the first go - then took the code out - and this worked for a few days, but stopped again.

I’m going to try and fix the cookie thing, but I don’t have a desktop etc on my pi, so it’s a bit of a job. I have a Mac mini running all the time, so I may have a go on that. But if we are having to redo the cookie every couple of weeks , I may Wait for another solution.

Thanks.
running domoticz 3.4834 on rpi2, with
Hue bridge / bulbs.
lightwave rf sockets, mood controlers, sensors & contacts.
Home bridge / Siri.
Ha bridge / echo Alexa.
Hard wired alarm system - setting home / away status.

Next: harmony hub.
User avatar
EdddieN
Posts: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

Re: Alexa text to speech

Post by EdddieN »

It works for me, although a bit slow...
I used the second script and jq
11101101 - www.machinon.com
User avatar
philchillbill
Posts: 396
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Alexa text to speech

Post by philchillbill »

Works great for a few days until the cookie expires. PITA to have to renew it manually.


Sent from my iPhone using Tapatalk
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
Hesmink
Posts: 168
Joined: Monday 22 June 2015 10:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Alexa text to speech

Post by Hesmink »

For anyone who has abandoned this because of the cookie thing: There is now support for 2 factor authentication, supposedly eliminating the re-logging in.
Check https://blog.loetzimmer.de/2017/10/amaz ... -echo.html

You have to enable 2 factor authentication at amazon and add another app that will do the 2 factor stuff on linux for you.
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: Alexa text to speech

Post by emme »

I use Alexa-Remote2 node in nodered.
works like a charm!!!!! :P :P
The most dangerous phrase in any language is:
"We always done this way"
salopette
Posts: 187
Joined: Tuesday 07 March 2017 21:03
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Germany
Contact:

Re: Alexa text to speech

Post by salopette »

emme wrote: Monday 02 September 2019 17:13 I use Alexa-Remote2 node in nodered.
works like a charm!!!!! :P :P
How can I install this? Is there a manual for domoticz?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest