Alexa text to speech Topic is solved

Alexa, Google Home and Siri

Moderator: leecollings

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 »

sion wrote: Thursday 02 August 2018 1:29 @freijn
I had the same as this.
Does it work when you set it to just one of the echos?
You need Jq installed for this - and be sure to reboot after installing it.
It’s working perfectly for me now - so far only have it welcome us home; but plan to hook it up to smoke detectors to announce what detector has been triggered; and also just waiting on a power outlet with power monitoring - so we can get a reminder when the washing is done.

Has anyone found a way to get her to pause? Having ,, ,, seems to give a bit of a pause but not much.
After a reboot still no joy.

Can you please share your settings?

It does show this , but no sound

Code: Select all

pi@raspberrypi:~/domoticz/scripts $ ./alexa_remote_control.sh -d Office -e speak:'Put your text to announce here'
sending cmd:speak:Put your text to announce here to dev:Office type:A3S5BH2HU6V serial:G090LF1072121 customerid:A3MOWYBUE3S
Sequence command: Alexa.Speak
#LANGUAGE="de-DE"
LANGUAGE="en-US"

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

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


Thanks

Frank
Last edited by freijn on Thursday 02 August 2018 23:47, edited 2 times in total.
renerene
Posts: 316
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: Alexa text to speech

Post by renerene »

Update;
1) Install jq from https://stedolan.github.io/jq/download/ by using command sudo apt-get install jq
2) Downloaded 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) Filled the field Domoticz Settings -> Notifications -> ‘URL/Action’ with ‘script:///home/pi/domoticz/scripts/alexa_remote_control.sh -e speak:'MESSAGE' (without the #, no need for variable while testing)
All other fields are empty
5) After pressing test the following line comes into domoticz log:
2018-08-02 18:05:19.003 Error: Error executing script command (/home/pi/domoticz/scripts/alexa_remote_control.sh). returned: 256
6) sudo chmod 777 /tmp/.alexa.login
7) found the Dot on the german Amazon Site, my devices
8) switch off 2-way authentication on Amazon
7) Execute of the script in the SSH terminal shows:

Code: Select all

pi@raspberrypi:~/domoticz/scripts $ ./alexa_remote_control.sh
cookie does not exist. logging in ...
ERROR: Amazon Login was unsuccessful. Possibly you get a captcha login screen.
 Try logging in to https://alexa.amazon.de with your browser. In your browser
 make sure to have all Amazon related cookies deleted and Javascript disabled!

 (For more information have a look at /tmp/.alexa.login)
start of script:

Code: Select all

EMAIL='xxx'
PASSWORD='xxx'

#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'
What goes wrong whith Rpi Login to Amazon?
How can I see if there is a captha?
Do I need to forward a port?
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 »

You definitely have the captcha issue.
I ended up installing gui on my rpi with chromium to try the login via browser trick: didn't work.
What did work is installing a chrome add on to dump cookies, and save the login cookies to /tmp/.alexa.cookie (or something like that).

There is a copy of the alexa script on github somewhere. Look at the issues list to see a lot of talk about the captcha issue.
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 »

Oh wait, you need to put your language to de, don't worry, it's just for the script to login.
Bluelightcrew
Posts: 19
Joined: Thursday 02 February 2017 20:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.6708
Location: Deutschland
Contact:

Re: Alexa text to speech

Post by Bluelightcrew »

For all noobs like me ;-)

1) Install jq from by using command sudo apt-get install jq

2) reboot raspberry with command sudo reboot

3) Downloaded script from https://loetzimmer.de/patches/alexa_remote_control.sh (via blog https://blog.loetzimmer.de/2017/10/amaz ... o.html?m=1) and place it in /home/pi/domoticz/scripts/

4)put your email and password in the script

5)activate your language in the script (like here for German)
LANGUAGE="de-DE"
#LANGUAGE="en-US"

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

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

6) Set permissions on the script to 777 with command chmod 777 /home/pi/domoticz/scripts/alexa_remote.sh

7) test script with sudo ./alexa_remote.sh -d ALL -e speak:'Put your text to announce here'
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 »

Hi, ich komme irgend wie nicht weiter, jq habe ich installiert, den skript auch nach /home/pi/domoticz/scripts/ kopiert, Rechte vergeben!
Aber es passiert nichts?
Wie startet man das Ding?
Bluelightcrew
Posts: 19
Joined: Thursday 02 February 2017 20:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.6708
Location: Deutschland
Contact:

Re: Alexa text to speech

Post by Bluelightcrew »

salopette wrote: Friday 03 August 2018 18:59 Hi, ich komme irgend wie nicht weiter, jq habe ich installiert, den skript auch nach /home/pi/domoticz/scripts/ kopiert, Rechte vergeben!
Aber es passiert nichts?
Wie startet man das Ding?
Na hab ich doch geschrieben,
sudo ./alexa_remote.sh -d ALL -e speak:'dein text'
Wobei du ALL durch den Namen eines Echos auch ersetzten kannst
mit sudo ./alexa_remote_control.sh -a kannst dir auflisten lassen wie deine Gerätenamen sind
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Alexa text to speech

Post by heggink »

Geht's auch auf English bitte ?
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
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 »

Can anybody share the output of the command :
./alexa_remote_control.sh -d Office -e speak:'Put your text to announce here'

Where Office is 1 of your devices ?

Thanks in advantage!

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

Re: Alexa text to speech

Post by renerene »

Hesmink wrote: Friday 03 August 2018 9:19 Oh wait, you need to put your language to de, don't worry, it's just for the script to login.
No.it brings no imrprovement
What did work is installing a chrome add on to dump cookies, and save the login cookies to /tmp/.alexa.cookie (or something like that).
Interesting. Can you tell me more?
- There is a dozen of cookie add-ons within crhome. Which on did you use?
- Do I use my window machine to loagin and serach for the cookie? Do I understand you correct?
- is the cookie transferred to the RPI by cut/copy action of the cookie text to \tmp\.alexa.login? Or do I need the whole cooking file?
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 »

renerene wrote: Saturday 04 August 2018 23:37
Hesmink wrote: Friday 03 August 2018 9:19 Oh wait, you need to put your language to de, don't worry, it's just for the script to login.
No.it brings no imrprovement
What did work is installing a chrome add on to dump cookies, and save the login cookies to /tmp/.alexa.cookie (or something like that).
Interesting. Can you tell me more?
- There is a dozen of cookie add-ons within crhome. Which on did you use?
- Do I use my window machine to loagin and serach for the cookie? Do I understand you correct?
- is the cookie transferred to the RPI by cut/copy action of the cookie text to \tmp\.alexa.login? Or do I need the whole cooking file?
Lots of info here
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 »

freijn wrote: Saturday 04 August 2018 22:15 Can anybody share the output of the command :
./alexa_remote_control.sh -d Office -e speak:'Put your text to announce here'

Where Office is 1 of your devices ?

Thanks in advantage!

Frank
For me it says:

Code: Select all

sending cmd:speak:Put your text to announce here to dev:Kantoor type:XXXXXXXXXXXX serial:XXXXXXXXXXXX customerid:XXXXXXXXXXXXXXX
Sequence command: Alexa.Speak
Numbers replaced by XXXX

And ofcourse I hear Alexa speaking the words.
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 »

Thanks Hesmink !

Hemmm so i am getting same output on my screen.... but no sounds....

Do you mind sharing your :
LANGUAGE=
AMAZON=
ALEXA=

settings as well please?

Many thanks for your time !!
Frank
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 »

freijn wrote: Tuesday 07 August 2018 10:45 Thanks Hesmink !

Hemmm so i am getting same output on my screen.... but no sounds....

Do you mind sharing your :
LANGUAGE=
AMAZON=
ALEXA=

settings as well please?

Many thanks for your time !!
Frank
LANGUAGE="de-DE"
AMAZON='amazon.de'
ALEXA='layla.amazon.de'

And (ofcourse) my dots are registered on my amazon.de account.
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 »

THanks !!!

Then I will move to the DE site as well. Will let you know the results

Frank
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 »

Hello, how can I let a single device speak instead of ALL?
It should be the (Andrejs Echo Show). but if I sudo ./alexa_remote_control.sh -d Andrejs Echo Show -e spea k: 'Put your text to announce here'
Enter, error comes.
  • ERROR: unknown option Echo
    ./alexa_remote_control.sh [-d <device>|ALL] -e <pause|play|next|prev|fwd|rwd|shuffle|vol:<0-100>> |
    -b [list|<"AA:BB:CC:DD:EE:FF">] | -q | -r <"station name"|stationid> |
    -s <trackID|'Artist' 'Album'> | -t <ASIN> | -u <seedID> | -v <queueID> | -w <playlistId> |
    -i | -p | -P | -S | -a | -m <multiroom_device> [device_1 .. device_X] | -lastalexa | -l | -h

    -e : run command, additional SEQUENCECMDs:
    weather,traffic,flashbriefing,goodmorning,singasong,tellstory,speak:'<text>',automation:'<routine name>'
    -b : connect/disconnect/list bluetooth device
    -q : query queue
    -r : play tunein radio
    -s : play library track/library album
    -t : play Prime playlist
    -u : play Prime station
    -v : play Prime historical queue
    -w : play library playlist
    -i : list imported library tracks
    -p : list purchased library tracks
    -P : list Prime playlists
    -S : list Prime stations
    -a : list available devices
    -m : delete multiroom and/or create new multiroom containing devices
    -lastalexa : print device that received the last voice command
    -l : logoff
    -h : help
sudo ./alexa_remote_control.sh -a
the following devices exist in your account:
Juliettas Echo
Valerias Echo Dot
Musik
Andrejs Echo Show
This Device
Andrej's Alexa Apps
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 »

Amazing.......

I moved my account to .de and it worked immediate.....however I have lost lots of skills now. grrrrrrrrrrr
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Alexa text to speech

Post by heggink »

How do you move to DE? Re-register?
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
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 »

Its a single click

https://www.amazon.com/gp/help/customer ... =201248840

but....... lost all my skills assigned and lost my favo skills as they do not have them in DE @#$#@$!$#! :-(
Jzjr
Posts: 14
Joined: Monday 05 October 2015 15:00
Target OS: Linux
Domoticz version: 4.10717
Location: UK
Contact:

Re: Alexa text to speech

Post by Jzjr »

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
-
Fred Boniface

- Dell Optiplex 390 - Ubuntu Linux 18.04.01 LTS - Aeotec Z-Wave USB - RFXtrx433 - Hue Hub 2 - LGTV Plugin -
Hue Bulbs in every room, Temp Sensors on each floor, Temp-Monitoring Fridge, LightWaveRF 'Mood Switches'
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests