Alexa text to speech Topic is solved

Alexa, Google Home and Siri
Hesmink
Posts: 194
Joined: Monday 22 June 2015 10:48
Target OS: Raspberry Pi
Domoticz version:
Location: The Netherlands
Contact:

Re: Alexa text to speech

Post by Hesmink » Sunday 12 August 2018 20:21

Jzjr wrote:
Sunday 12 August 2018 19:29
I can get it working with tts if I choose an individual device but not if I choose everywhere?

Has anyone got it working with the everywhere device?

Thanks
Fred
If I do:
./alexa_remote.sh -d ALL -e speak:'Hello!'

I will have all my dots say 'Hello!'

renerene
Posts: 122
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: Alexa text to speech

Post by renerene » Sunday 12 August 2018 23:26

Ok, Got it working.

please note; the device is on the Amazon.de device. I'm in the Netherlands, my Dot speaks English. The cookie was received using the Rpi VNC terminal within Chromium, after logging in to the German site. This is in my .sh file:

Code: Select all

#LANGUAGE="de-DE"
LANGUAGE="en-US"

#AMAZON='amazon.de'
#AMAZON='amazon.com'
AMAZON='amazon.co.uk'

ALEXA='alexa.amazon.co.uk'
#ALEXA='layla.amazon.de'
#ALEXA='pitangui.amazon.com'
Complete procedure:
1) Install jq from https://stedolan.github.io/jq/download/ by using command sudo apt-get install jq
2) Download script from https://loetzimmer.de/patches/alexa_remote_control.sh (via blog https://blog.loetzimmer.de/2017/10/amaz ... -echo.html) and placed it in /home/pi/domoticz/scripts/
3) Set permissions on the script to 777
4) (sudo chmod 777 /tmp/.alexa.login) ?neccessary? was not needed second time
5) (found the Dot on the german Amazon Site, my devices ) ? don't know if it matters, see note above
6) switch off 2-way authentication on Amazon
7) login to Rpi desktop, using VNC viewer. For me, I had to completely re-install, from RASPBIAN STRETCH LITE to RASPBIAN STRETCH WITH DESKTOP, because I could not get the desktop going from stretch lite
8) add this extension to Chromium https://chrome.google.com/webstore/deta ... coicjekelh
Then goto https://alexa.amazon.com/, login to amazon, and run the extension.
Paste the text into /tmp/.alexa.cookie and you've bypassed captcha's and possibly 2fa.

more info: https://github.com/thorsten-gehrig/alex ... /issues/10
9) test the script;
/home/pi/domoticz/scripts/alexa_remote_control.sh -e speak:'hello, this is perfect'

renerene
Posts: 122
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: Alexa text to speech

Post by renerene » Sunday 12 August 2018 23:32

and now, for this amateur, how can I send a string to Alexa with this setup/script, using dzVents?

build a URL like this in dzVents?
script:///home/pi/domoticz/scripts/alexa_remote_control.sh -e speak:'#MESSAGE'

freijn
Posts: 356
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Alexa text to speech

Post by freijn » Monday 13 August 2018 13:42

renerene wrote:
Sunday 12 August 2018 23:26
Ok, Got it working.

please note; the device is on the Amazon.de device. I'm in the Netherlands, my Dot speaks English. The cookie was received using the Rpi VNC terminal within Chromium, after logging in to the German site. This is in my .sh file:

Code: Select all

#LANGUAGE="de-DE"
LANGUAGE="en-US"

#AMAZON='amazon.de'
#AMAZON='amazon.com'
AMAZON='amazon.co.uk'

ALEXA='alexa.amazon.co.uk'
#ALEXA='layla.amazon.de'
#ALEXA='pitangui.amazon.com'
Rene

I am confused.. Your dot is registerd to amazon.de ???

In the script definitions I do see UK refer ?

The thing which annoy me is that I have lost all my US skills and can only use german skills now #$%#$%@$@#$$

Can you use US skills now? and still have Alexa talking to you by using the script ?

Cheers,

Frank

User avatar
heggink
Posts: 481
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi
Domoticz version: V3.9530
Location: NL
Contact:

Re: Alexa text to speech

Post by heggink » Monday 13 August 2018 14:53

Same here. I switched to the German instance as well but needed to use the uk servers in the script. Dot also speaks British although I cannot install any skills unless I first switch to German, install German skills and then change back to English-uk. Really weird but at least I can use controlicz and let alexa speak...
Pi3, latest beta
RFXCOM, z-wave (AEOTEC, switches, temhum, pir, contacts),
Plugwise2py, P1 'smart'meter & solar panel
Alexa, Wifi Cams motion detection
ESP: relays, PIR & Temp/TempHum
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest

freijn
Posts: 356
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Alexa text to speech

Post by freijn » Monday 13 August 2018 14:56

heggink wrote:
Monday 13 August 2018 14:53
Really weird but at least I can use controlicz and let alexa speak...
Same here......Lost all skills, but still a happy user because of this new toy !! :-)

quack3d
Posts: 93
Joined: Sunday 26 March 2017 17:03
Target OS: -
Domoticz version:
Contact:

Re: Alexa text to speech

Post by quack3d » Wednesday 15 August 2018 7:54

I'm trying to get this to work in Windows. I've downloaded the version of the script without jq and try to run it with win-bash. First I modified the script and put in email, password, changed language to en-US, amazon.com and pitangui.amazon.com, and changed curl path to be just 'curl'. I also changed paths to cookie, devlist and devtxt since Windows dont use /tmp/... .

But, when I try to run it it says 'cookie does not exist. logging in ... ERROR: Amazon Login was unsuccessful. Possibly you get a captcha...'

So I tried using an extension like suggested above. The suggested one can't be installed anymore, so I used this: https://chrome.google.com/webstore/deta ... nbfjonfjfg . But the the script just says "cookie expired, logging in again ... ERROR: Amazon Login was unsuccessful...".

Any ideas?

quack3d
Posts: 93
Joined: Sunday 26 March 2017 17:03
Target OS: -
Domoticz version:
Contact:

Re: Alexa text to speech

Post by quack3d » Thursday 16 August 2018 8:23

Not possible without "moving" the Dot to .de perhaps? Don't wanna do that. :P

freijn
Posts: 356
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Alexa text to speech

Post by freijn » Thursday 16 August 2018 10:22

Quack

it started working for me when I moved the dot to .de immediately.
Alexa still speaks UK-English , it does keep my real home address and weather is local still but.........
I have lost all my "toy" skills. (good weather, news and games and find my phone) however,
Controlicz is fortunately still working and available in the .de store.

If you got it to work from the .com USA link, I would be VERY interested ! and you would be my Hero ! :-)

I have asked the same question to the german guy as well, awaiting the answer....

Frank

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests