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

    #76
    No, there just isn't an API from Amazon that we can use. Hopefully they will provide something we can use.

    Originally posted by LeeIII View Post

    Saw this thread and wondered if it ever went anywhere. Any luck ?
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #77
      Originally posted by rjh View Post
      No, there just isn't an API from Amazon that we can use. Hopefully they will provide something we can use.
      Q: Are you putting any pressure on them, and telling them what it is that you need?

      Homeseer can't be the only company out there drooling for more features.

      Joe (zimmer62)

      BLSecurtiy, AC-RF2, RCS Serial Thermostats, RFXCOM SMarthome SwitchLinc, mcsXap, Global Cache GC100, SqueezeBox, TWA_ONKYOINTEGRA, BLLogMonitor, BLPlugins, BLRadar, BLSpeech, BLZLog.aspx, HSTouch (Windows, iPhone, iPod), USB Mimo touchscreens, VMWare Server, Vortexbox, Windows Home Server, MyMovies, Windows Media Center, X10, ZWave, and much much much more.

      Comment


        #78
        Although this ability is great I'd still like to see a way to directly send audio from HS3 to any of the Echo's locally without using the cloud. That ability combined with Amazon Polly via PollyC would allow for TTS even when the Internet is down.

        And to HomeSeer, remember that if you want to integrate PollyC into HS3 for both windows and linux you can as long as you keep the developer credits.
        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


          #79
          Originally posted by Timon View Post
          And to HomeSeer, remember that if you want to integrate PollyC into HS3 for both windows and linux you can as long as you keep the developer credits.
          Don't forget the links!

          https://github.com/Timon0x31/PollyC

          https://forums.homeseer.com/forum/ho...g-amazon-polly

          Comment


            #80
            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

            Can you expand upon this? When you use the mentioned plugin, what speakers is the output coming out of? Does it come from the alexa devices or dedicated speakers? i too love star trek and have built my environment with HSTouch panels in STTNG themes. unfort7natley the speakers are not loud. So if this Alexa script, which I have working, paired with the DAPP plugin will output from my itunes library on the alexas, I am in.

            Comment


              #81
              Originally posted by Nacman View Post


              Can you expand upon this? When you use the mentioned plugin, what speakers is the output coming out of? Does it come from the alexa devices or dedicated speakers? i too love star trek and have built my environment with HSTouch panels in STTNG themes. unfort7natley the speakers are not loud. So if this Alexa script, which I have working, paired with the DAPP plugin will output from my itunes library on the alexas, I am in.
              The MP3 is played from local speakers using Itunes DAPP plugin and then the Alexa announcement is played through the Alexa speaker. I delay the start of the Alexa announcement by a few seconds to allow the MP3 to play first. A little kludgy and you have to play with the timing to get it right, but it can be handled with a single Homeseer event.

              There is also a way to have Alexa play the MPG. See this post for detailed how-to: https://forums.homeseer.com/forum/ho...33#post1319233

              --Barry

              Comment


                #82
                Originally posted by rjh View Post
                No, there just isn't an API from Amazon that we can use. Hopefully they will provide something we can use.


                Well this can be done within SmartThings by using the Echo Speaks device handler. You grant permission from Alexa to the device handler one time at setup and all of your Alexa devices are imported into SmartThings. After that it just works. The device handler is 3rd party, so I don't think Samsung pulled some special strings with Amazon to get the API calls.

                Once set up in SmartThings you can use WebCore to set up TTS events. You can also set up a "Wildcard" TTS event with WebCore using a replacement variable that will speak whatever text is sent to it via JSON call. Using that I have events setup in Homeseer to speak local weather warnings, door open/close events, vehicle entering driveway, etc. You can play the announcement through a single device or a group of devices.

                Using Homeseer replacement variables, announcement text can be generated on the fly when a HS event runs. The TTS is then fired off to a URL with the text appended as a string to the end of the URL. Alexa grabs the text string and announces it.

                Where there is a will, there is a way.

                --Barry

                Comment


                  #83
                  [Deleted, wrong thread]

                  Comment


                    #84
                    Originally posted by logman View Post

                    The MP3 is played from local speakers using Itunes DAPP plugin and then the Alexa announcement is played through the Alexa speaker. I delay the start of the Alexa announcement by a few seconds to allow the MP3 to play first. A little kludgy and you have to play with the timing to get it right, but it can be handled with a single Homeseer event.

                    There is also a way to have Alexa play the MPG. See this post for detailed how-to: https://forums.homeseer.com/forum/ho...33#post1319233

                    --Barry
                    Thank you!

                    Comment


                      #85
                      Originally posted by Furious View Post

                      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.
                      Thank you Furious.
                      I had this working from a PowerShell instance on my HomeSeer server, but could not get the event to execute in the HomeSeer web GUI for the life of me.

                      Copied the wsl.exe to the directory I keep my PowerShell/Bat scripts in. TaDa!!!!!!! it works.

                      Thanks again!

                      Comment


                        #86
                        Originally posted by fuzzysb View Post
                        just as a FYI, i have got this working directly from a windows 10 machine without the need for other machines/apps by installing the Windows Feature "Windows Linux Subsystem" then rebooting

                        after which i installed the Ubuntu Linux app from the windows store, see the link for further info.

                        then all i did once linux was setup is run the following commands

                        apt-get update
                        apt-get install jq
                        apt-get install unzip
                        wget https://github.com/walthowd/ha-alexa...ive/master.zip
                        unzip master.zip


                        now i just made the scripts executable.

                        then created a secrets.yaml file in the same ~/<ExtractedFolder>

                        which contains only the following info

                        alexa_email: my@amazonemail.com
                        alexa_password: myamazonpassword


                        i then followed the setup instructions available in the github repo about getting the cookie. (word of advice i used firefox as Chrome etc.. would not work) ensure you comment/uncomment your correct region info, i also used the following Browser Line andreplaced the line in the code as i had better success with this

                        BROWSER='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36'

                        once all that was up and running i just ran

                        ~/<ExtractedFolder>/alexa_remote_control.sh -a

                        which returned all my devices.

                        and as a test i just ran

                        ~/<ExtractedFolder>/alexa_remote_control.sh -d "Alexa Device Name" -e speak:"This is a test message"

                        once you have output, i just created the an AlexaSpeak.bat in a directory in the windows partition with the following:

                        @echo off
                        set arg1=%1
                        set arg2=%2
                        shift
                        shift
                        %SystemRoot%\sysnative\wsl.exe /home/<wsl user>/<ExtractedFolder>/alexa_remote_control.sh -d %arg1% -e speak:%arg2%


                        ensure you set the script name and path correctly to match your install

                        after which you can run the batch file with your Alexa Device Name and Message, you can use the "ALL" instead for device name but if like me you have more than 6 devices it wont send to all, and i cannot get a speaker group to work either. but for individual notifications to device it works very well so far. but i am still testing.



                        This should also work similarly on linux HS3 installs but you just need a different wrapper script.

                        hope this helps as this has been my utopia for a long time as i have an alexa in every room including my toilets

                        I have done a number of tests including reboots now over 2 weeks, i can see that the authentication is working even when the cookie is expired, and it does not prompt for
                        I just followed your instructions and things are working well.

                        However, what's the process to refresh the cookie? Why I ask is because I had to use a firefox browser and export the cookie manually.

                        Comment


                          #87
                          Originally posted by mik3y View Post

                          I just followed your instructions and things are working well.

                          However, what's the process to refresh the cookie? Why I ask is because I had to use a firefox browser and export the cookie manually.
                          you dont need to, the cookie will keep being refreshed automatically. not had to do anything else since i set it up. works flawlessly.

                          just checked that's over 1 year now and no token refresh needed

                          Comment


                            #88
                            Originally posted by fuzzysb View Post

                            you dont need to, the cookie will keep being refreshed automatically. not had to do anything else since i set it up. works flawlessly.

                            just checked that's over 1 year now and no token refresh needed
                            How is it refreshed? Each time you kick off tts?

                            i noticed the version you had posted didn’t allow automation events so i found the latest off github and cloned it.

                            now everything appears to work. Just an FYI.

                            Comment


                              #89
                              Yes each time i the script is used it will refresh it's key if needed. So as long as you are doing at least one TTS every day you will be fine. I announce daily my Hoover's will be going around 15 mins before they do, so you can look out for any phone charging cables on the floor and open all the doors.

                              Comment


                                #90
                                Originally posted by fuzzysb View Post
                                Yes each time i the script is used it will refresh it's key if needed. So as long as you are doing at least one TTS every day you will be fine. I announce daily my Hoover's will be going around 15 mins before they do, so you can look out for any phone charging cables on the floor and open all the doors.
                                Okay good to know.

                                Comment

                                Working...
                                X