Announcement

Collapse
No announcement yet.

Something simple to tell if HS is currently speaking

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

    Something simple to tell if HS is currently speaking

    Hi,

    I am looking for something simple I can use in a script to determine whether HS is currently speaking or not.

    For example:

    if hs.isSpeaking then
    dont speak
    else
    speak
    end if

    I know SpeakEasy does this but I do not want to purchase SpeakEasy just for this ability. This is the only ability I need to be able to do.

    This is what I want to accomplish.

    Currently if HS is speaking my house announcements and someone opens an exterior door during the announcements, HS will not speak that the exterior door is open until the house announcements are done. By this time, I do not care to hear that the door opened. It is after the fact. So what I want to be able to do is wrap the script code that speaks when the door is open around the if statement above, so that if HS is currently speaking, it will not speak that the door was opened. I have a lot of other stuff that I want to use this logic with as well.

    Does anyone know of a simple solution?

    TIA
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    #2
    HS provides an event callback which notifies if audio activity is happening. The two IsSpeaking and the SpeakEasy plugins use this to provide a scripting interface. I'm only familiar with v1.0 of IsSpeaking, but my memory is that a virtual device contains the speaking status and this device can be used in script to know the status or it can be used as the object of an event.

    There were some situations which IsSpeaking could not handle and a few more methods were provided by HST to help better integrate the audio with user scripts. These additional methods is what George uses to provide the more complete functionality of SpeakEasy.

    Comment


      #3
      I managed to get something to work for me using the IsSpeaking plugin.

      Thanks Michael.

      and Rick for writing the isSpeaking plugin. It will do what I need it to.
      Cheers,
      Bob
      Web site | Help Desk | Feature Requests | Message Board

      Comment


        #4
        Can event callback be used in a script? Does anyone have a simple example of using a callback to monitor sound output?
        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

        Comment


          #5
          The only documentation I've seen on the speech proxy callbacks is in the plug-in developers guide. So I don't think it is supported in scripts. IsSpeaking is one way of interfacing this with scripts, SpeakEasy is another. If the need is there, I am sure someone will come up with another plug-in.

          Bill

          Comment


            #6
            blade:
            What I have done is on my hourly weather report script, is after every line of speaking make sure it ends with true.

            EXAMPLE:
            hs.Speak "The following is the locat weather report for $date", True
            hs.Speak "at $time", True

            The True statement allows HS to pause and see if any other commands are going on and if the line is ture before continuing on the the report, or at leat it does with mine. Try using True with your house announcements. Hope that helps Dave......

            Comment


              #7
              The speak proxy functionality is only available to a plug-in, but the event callback for speech events is available to scripts.

              The speak proxy was implemented to actually stop the speak from happening until speakers and such are ready. George's SpeakEasy handles all of this functionality nicely.

              The original IsSpeaking provided the IsSpeaking script command and device that you could use to determine if speaking was happening. I used to use it to hold up a script until it was done speaking a lengthy amount of text such as a weather forecast, so that speakers or other events did not occur at a time when I was not ready for them.

              After George put out the first version of SpeakEasy, he added the code from IsSpeaking to his plug-in so that it could also provide the IsSpeaking functionality.

              The version of IsSpeaking that is out there now has both the IsSpeaking and the Speak Proxy functionality - you can permanently turn off the speak proxy and just use the IsSpeaking stuff if you need. For speaker switching and other speaking enhancements, SpeakEasy is the way to go - I use that now instead of my own plug-in!
              Regards,

              Rick Tinker (a.k.a. "Tink")

              Comment


                #8
                Rick,
                Do you have a link to the script example of the event call back used to check for speech?
                💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                Comment


                  #9
                  Rupp,

                  No link readily available, but here it is:

                  hs.plugin("Is Speaking").ContinueAfterSpeaking

                  This suspends the script at that line until HS is no longer speaking.
                  Regards,

                  Rick Tinker (a.k.a. "Tink")

                  Comment


                    #10
                    Rick,
                    Let me clarify. I can't find the Is speaking plugin. Does it still exist?
                    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                    Comment


                      #11
                      Yes - check to see if you have it hidden in the updater.
                      Regards,

                      Rick Tinker (a.k.a. "Tink")

                      Comment


                        #12
                        Crap,
                        How do these keep getting hidden. I have never hid any packages. Oh well that fixed it. Thanks yet again Rick.
                        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                        Comment

                        Working...
                        X