Announcement

Collapse
No announcement yet.

Scripting

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

    Scripting

    I cant seem to find how to script a simple speak in a vb script.

    This is what I do in an event.

    {priority=normal,speaker=WholeHouse,volume=55}This is a test

    how do I do this is a script?

    I have tried: hs.Speak("{priority=normal,speaker=MasterBedroom,queue=disca rd,volume=65}" & "This is a test", True, )
    Kirk

    http://cleverhouseautomation.ca
    http://southcoastwebsitedesign.ca

    #2
    Try this:

    Code:
    hs.Speak("{priority=normal,speaker=MasterBedroom,queue=discard,volume=65}This is a test")
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    Comment


      #3
      If I do this in an event it seems to work. If I do it from a script it seams to ignore the tags and speak everywhere. Here is an example.

      hs.Speak("{priority=normal,speaker=MasterBedroom,queue=disca rd,volume=35}The time is $$time It is time to get up")

      any ideas why that would be?
      Kirk

      http://cleverhouseautomation.ca
      http://southcoastwebsitedesign.ca

      Comment


        #4
        The hs.speak call takes html type specifications, which use "< >" instead. Try

        Code:
        hs.Speak("<priority=normal,queue=discard,volume=35>This is a test")
        which works for me.

        Comment


          #5
          That does not work. It actually just speaks all of the tag as well. So it seems the way I have it , the tag is recognized as a tag and not spoke, but it does not play it only in the bedroom, but throughout the whole house.
          Kirk

          http://cleverhouseautomation.ca
          http://southcoastwebsitedesign.ca

          Comment


            #6
            Originally posted by ldragon99 View Post
            That does not work. It actually just speaks all of the tag as well. So it seems the way I have it , the tag is recognized as a tag and not spoke, but it does not play it only in the bedroom, but throughout the whole house.
            You are running the BLSpeech plugin, so it may have different scripting rules than normal VB.net script. My apologies if that is the case.

            When I ran that exact statement I gave in a normal script, it did not speak the tags, just the text.

            The syntax for hs.Speak (in normal scripting) from the documentation:

            Purpose
            This function speaks some text.

            Parameters

            Parameter: Text
            Type: String
            Description: This is the string you want to speak. It may also be the complete path to a WAV file to be played.

            Parameter: Wait (Optional)
            Type: Boolean
            Description: If set to TRUE, the function will not return until the system finishes speaking. This is useful if you are switching between speaking and
            listening. You cannot listen and speak at the same time on some systems. If this parameter is missing, the system will not wait.

            Parameter: Host (Optional)
            Type: String
            Description: Leaving this a null string will apply the command to the first instance HomeSeer finds, otherwise use the hostname of the computer for this
            command. If more than one instance of the Speaker application is running on "host" then you may need to specify the instance as well in the format
            host:instance.

            Returns
            None.

            So you see that in normal scripting, the speaker is in a separate parameter.

            Here is another example of specifying a specific speaker, and using a tag to change the voice:

            Code:
            hs.Speak("<voice required=""name = Microsoft David Desktop"">This is a test", True, "Server:Kitchen")
            Server:Kitchen is just the local full name for my kitchen speaker (an HS Touch tablet).

            Knowledge of normal scripting may help you decipher BLSpeech and its requirements.

            Comment


              #7
              Is anyone on here using BLSpeech in a script? Can I see an example of how they are doing it. I feel like I am missing something. As I mentioned that works when called from an event. And I took it right from Blades example above.
              Kirk

              http://cleverhouseautomation.ca
              http://southcoastwebsitedesign.ca

              Comment

              Working...
              X