Announcement

Collapse
No announcement yet.

Alexa TTS that works well, same solution as for Home Assistant.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #61
    Originally posted by fuzzysb View Post
    May be great for those wanting to start out, but with 12 Alexa devices I am significantly invested in the platform
    Same for me as well, not to mention the Fire Tv integration with Alexa ...

    I really wish there was a viable solution for speech. We just moved to a new house and I miss what I had done previously. Too much to re-do quickly ...
    -Skybolt

    Comment


      #62
      Originally posted by rjh View Post
      I have to say though, just use the chromecast plugin with a Google Home device, works perfect and no hoops to jump through! (for TTS)
      Well I do have to say that this sparked my interest and I stopped and picked up a mini on my way home today. It was extremly easy to setup, but I am not impressed with the voice and how it sounds, not the quility, but the phonetics.

      EDIT: Well as usual, i should play around a bit BEFORE posting. Using the Google voice works and sounds great! The mini's sound ok and you can shut the mic off. So for $50 a room you get a HS dedicated speaker - speaking what ever you want.

      Sorry didn't mean to HiJack this thread for Google ...
      -Skybolt

      Comment


        #63
        We have not implemented sensor reports to Alexa yet, work was started but its not complete. I don't have a date when it will be ready right now. We have to do Google also.
        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

        Comment


          #64
          I got this work - Many thanks to fuzzysb and everyone else here for helping a non-programmer install this.

          I'd like to migrate away from an unreliable Tasker-based announcement system that uses a couple Android devices as the speakers. The one thing I'm missing with this Alexa solution is that my current announcements start off with a mp3 chime. Does anyone know of a way to incorporate some kind of chime (preferably custom using an mp3) before Alexa speaks? [Earlier in this thread, I saw the mention of the Home Assistant Alexa plugin. I suppose I could research that - but I figured I'd ask in case there was a simpler way.]

          Also, how are people handling the TTS to multiple Echos at the same time? Are you just calling multiple .bat files in the HS3 Event? It seems to work but wasn't sure if I'd run into issues trying to initiate 5 or 6 .bat files...

          Installation tips:
          1) I can barely get around Linux. After exporting cookies.txt with Firefox (and the cookies.txt Firefox extension), I used this in the Linux shell:
          Code:
          cp /mnt/c/Users/[win user name here]/Downloads/cookies.txt /tmp/.alexa.cookie
          2) When I updated the path in alexa_remote_control.sh for secrets.yaml, I kept getting an error that the file didn't exist. It looks like it didn't like me using ~/ha-alexa-tts-master/secrets.yaml. I had to change the path to /home/[admin_name_here]/ha-alexa-tts-master/secrets.yaml.

          Comment


            #65
            Originally posted by fcol View Post

            The one thing I'm missing with this Alexa solution is that my current announcements start off with a mp3 chime. Does anyone know of a way to incorporate some kind of chime (preferably custom using an mp3) before Alexa speaks?
            I play an MP3 (Star Trek "Hail All Decks") before some Alexa announcements using the i-Tunes DAPP plugin.

            Alexa can also play MP3s, so you could probably ask her to play the MP3 prior to the announcement. I've never tried that.

            --Barry

            Comment


              #66
              fcol, or others, is there an updated version with the cookie handling solved for this? I got this to operate mid last year but found the every 2 week cookie refresh a PITA, and with the desire to use the announcements for (business) alerts that require immediate attention, I abandoned it. Anyone mind dropping the latest on it, along with any links? Would love to get it working again if there is a cookie-perm feature!

              Thanks

              Comment


                #67
                Originally posted by rjh View Post
                We have not implemented sensor reports to Alexa yet, work was started but its not complete. I don't have a date when it will be ready right now. We have to do Google also.
                Selfish vote to get Alexa out and working - even if Beta and obtain user feedback. I have an Echo in every room of the house, and have had great success with it as an interface...just wish my relationship with her was bi-directional. :-)

                Comment


                  #68
                  Originally posted by mterry63 View Post
                  I just installed this and tested it and can confirm it works. There are a few cavaets -

                  1. The script assumes some of the files are in a homeassistant directory (like secrets.yaml). You'll need to edit the script with nano and give it the correct path, or create the path it expects and put the secrets.yaml in there.

                  2. I had to use the firefox and cookies.txt extension, wouldn't work in chrome.

                  3. This is not for the security-minded individual. Obviously your amazon.com account and password are stored clear text in a file. Pay attention to file permissions at the very least. Also, the cookies.txt file is effectively the same as your account and password as anyone who has this file has the ability to bypass login of your alexa.amazon.com account (at a minimum).

                  I do wish HomeSeer rjh would consider adding direct HS3 support of TTS with Alexa. Seems like it should be possible now with some of the new hooks Amazon has provided, especially since they added device push messages.
                  I'm going to take a look at these scripts as soon as I get some time. I'll also talk it over with Dave, zwolfpack, to see if we can incorporate this into PollyC or at least set it up so it can be installed the same as PollyC is installed. This has the advantage that the standard TTS interface inside of HS3 will work rather can create another interface as is done currently.
                  HomeSeer Version: HS3 Standard Edition 3.0.0.548
                  Linux version: Linux auto 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
                  Number of Devices: 484 | Number of Events: 776

                  Enabled Plug-Ins: 3.0.0.13: AirplaySpeak | 2.0.61.0: BLBackup
                  3.0.0.70: EasyTrigger | 1.3.7006.42100: LiftMaster MyQ
                  4.2.3.0: mcsMQTT | 3.0.0.53: PHLocation2 | 0.0.0.47: Pushover 3P
                  3.0.0.16: RaspberryIO | 3.0.1.262: Z-Wave

                  Z-Net version: 1.0.23 for Inclusion Nodes
                  SmartStick+: 6.04 (ZDK 6.81.3) on Server

                  Comment


                    #69
                    Originally posted by Winter View Post
                    fcol, or others, is there an updated version with the cookie handling solved for this? I got this to operate mid last year but found the every 2 week cookie refresh a PITA, and with the desire to use the announcements for (business) alerts that require immediate attention, I abandoned it. Anyone mind dropping the latest on it, along with any links? Would love to get it working again if there is a cookie-perm feature!

                    Thanks
                    I think the workaround with Firefox and cookies.txt extension avoids the 2-week expiration issue. But I've only been using a week... I found another branch of the alexa_remote_control.sh that adds support for multi-factor auth:
                    https://github.com/thorsten-gehrig/a...ote_control.sh

                    I'm not sure if that helps as I'm veering way outside my capabilities here...

                    Comment


                      #70
                      Originally posted by logman View Post

                      I play an MP3 (Star Trek "Hail All Decks") before some Alexa announcements using the i-Tunes DAPP plugin.

                      Alexa can also play MP3s, so you could probably ask her to play the MP3 prior to the announcement. I've never tried that.

                      --Barry
                      I did figure out how to get Alexa to play an MP3 from my cloud library. One challenge is that Amazon stopped allowing uploads of your own music. So if you didn't upload a sound/chime/ringtone mp3 that you wanted years ago, then a workaround is to purchase something instead. Then you can issue "alexa_remote_control.sh -p" to get a list of all your available music, find the track ID, and then issue "-s <trackID>" to get Alexa to play that mp3.

                      Code:
                      ~/ha-alexa-tts-master/alexa_remote_control.sh -p
                      ~/ha-alexa-tts-master/alexa_remote_control.sh -d "<Echo_device_name>" -s <trackID>
                      This all seems a bit kludgy since there's a whole sound library available as a skill (but I'm not a programmer so I'm just trying to string something together based on other people's work):
                      https://developer.amazon.com/docs/cu...ndlibrary.html

                      One thing I've noticed is that when I use either commands such as list devices "alexa_remote_control.sh -a" or list purchased tracks "alexa_remote_control.sh -p", that it seems to pull from a cache or is not updating regularly. For example, I changed the name of an Echo a week ago and added a new device yesterday. But they're still not showing up when I type "alexa_remote_control.sh -a". I also purchased a few mp3 ringtones (so I could add chimes before TTS announcements) and they're not showing up yet. Any thoughts on what's happening here?

                      Comment


                        #71
                        I can't wait to be able to trigger Alexa TTS.

                        its about the only thing missing

                        Comment


                          #72
                          Originally posted by fcol View Post
                          One thing I've noticed is that when I use either commands such as list devices "alexa_remote_control.sh -a" or list purchased tracks "alexa_remote_control.sh -p", that it seems to pull from a cache or is not updating regularly. For example, I changed the name of an Echo a week ago and added a new device yesterday. But they're still not showing up when I type "alexa_remote_control.sh -a". I also purchased a few mp3 ringtones (so I could add chimes before TTS announcements) and they're not showing up yet. Any thoughts on what's happening here?
                          FYI: Purging the cookie and exporting a new cookie file will force a refresh of the device list. And in doing so, it will give the latest device list with any name changes since the last cookie export. In my case, I had to redo a couple events since I was using an out-of-date name for one of my Echo Dots.

                          My cookie expired after two weeks but I am assuming it is because I didn't click "Keep me signed in" when I exported the cookies in Firefox 2 weeks ago. Doh! This time I clicked "Keep me signed in" so I am hoping that will work for a while...

                          Comment


                            #73
                            I find the biggest limitation so far is the inability to send TTS to groups, apart from that I find it works perfectly. For some reason, I don't have my cookie expiring?

                            Comment


                              #74
                              Originally posted by Matt Powell View Post
                              I seem to be having some issues, i can get it working but not from homeseer i get this back?

                              'C:\WINDOWS\System32\wsl.exe' is not recognized as an internal or external command,
                              operable program or batch file.
                              Press any key to continue . . .



                              So my .bat reads like this

                              @echo off
                              set arg1=%1
                              set arg2=%2
                              shift
                              shift
                              %SystemRoot%\System32\wsl.exe /root/alexa_remote_control.sh -d %arg1% -e speak:%arg2%
                              pause
                              I had this problem, and it's down to permissions - HS can't see the exe.
                              Just copy wsl.exe elsewhere and run it from there.

                              BTW, thanks for all the posts here, got this all running yesterday - summarising important things to note:
                              Use firefox with the cookies addin.
                              Log in to the alexa site with "keep me signed in" checked
                              Copy the cookies.txt file to the right location
                              Edit the script to set the correct url and locale
                              Edit the script to point to the correct location for the secrets.yaml file


                              Here's the script I've used to be able to shell out and target specific devices. It grabs the string of device 3 then sends that to two dots without having multiple batch files.
                              Code:
                              Sub Main(parm as object)
                              
                              dim s, commd as string
                              s=hs.DeviceString(3)
                              commd=chr(34)+"/home/pi/ha-alexa-tts-master/alexa_remote_control.sh"+chr(34)+" -d "+chr(34)+"Living Room dot"+chr(34)+ " -e speak:"+chr(34)+s+chr(34)
                              hs.writelog("Alexa",commd)
                              hs.launch("C:\scripts\wsl.exe",commd,"C:\windows\system32",0)
                              
                              commd="/home/pi/ha-alexa-tts-master/alexa_remote_control.sh -d "+chr(34)+"Bedroom 1 dot"+chr(34)+" -e speak:"+chr(34)+s+chr(34)
                              hs.writelog("Alexa",commd)
                              hs.launch("C:\scripts\wsl.exe",commd,"C:\windows\system32",0)
                              
                              End Sub

                              Comment


                                #75
                                Originally posted by rjh View Post
                                We seeing if we can create a plugin for this. The open issue is the login as right now that script uses cookie info to connect. We think we can use a token and just have the user login with a dialog we will present. Will keep you updated.
                                Saw this thread and wondered if it ever went anywhere. Any luck ?

                                Comment

                                Working...
                                X