Announcement

Collapse
No announcement yet.

Ability to use BLRandom in Dictionary

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

    Ability to use BLRandom in Dictionary

    In the BLSpeech Dictionary i would like to be able to replace a word with a random word...

    So lets say you want to replace the word yes.

    if you put the script call in the target

    &hs.speak(hs.plugin("BLRandom").RandomizeGroup("yes"), True)

    The computer could then speak random words for yes, (sure, ya, yup, etc...)

    Anyway for the plugin to accept script call or at least some call to BLRandom, like a tag or something

    [BLRandom=yes] or something like that?

    -Tom-
    -Tom-

    #2
    You can do it but I'm not sure you can do it as global kind of replacement for a word. I have a feeling, depending on what else is speaking, weather, alerts, time, date, etc that a global replacement would give you unintended consequences for some phrases.

    You can do it in speaking scripts easily though. Something like this should give you an idea. name it with a VB extension.

    PHP Code:
    Public Sub Main(ByVal Parms As Object
        
    Dim speakMsg As String "" 
        
    speakMsg speakMsg & ("Good Morning you lump")
        
    speakMsg speakMsg & (" . ")
        
    speakMsg speakMsg hs.Plugin("BLRandom").RandomizeGroup("yes")
        
    speakMsg speakMsg & (" . ")
        
    speakMsg speakMsg & ("it is time to get up")
        
    hs.Speak(speakMsgTrue)
        
    speakMsg Nothing 

    End Sub 
    Marty
    ------
    XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
    Playing with HS3 a bit but it's just play at this point.

    Comment


      #3
      i know that, my main reason for wanting this is that acknowledgment phrase when using VR.

      Default you say "computer" and it responses with "yes sire"

      So i would like to replace "yes sire" with a blrandom value so the acknowledgment phrase will be random.

      Does this make sense or am i confusing you?

      -Tom-
      -Tom-

      Comment


        #4
        Sorry about that, I misunderstood the question.
        Marty
        ------
        XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
        Playing with HS3 a bit but it's just play at this point.

        Comment


          #5
          no worries, im not the best at explaining things. is this something i can do currently or would this be a feature request. Thanks

          -Tom-
          -Tom-

          Comment


            #6
            Are you talking about randomizing the answer prompt for VR on the Phone setup web page in HS?
            If so then that field would have to have the ability to execute a script command. This would be a question for HS
            Cheers,
            Bob
            Web site | Help Desk | Feature Requests | Message Board

            Comment


              #7
              Now that I reread the question I think what twa wants is to use BLSpeech's dictionary to intercept the "YES" send it to BLRandom so it can be randomized, much like you did for BLOutlook in the "Announcement Prefix Values" boxes.

              At least I think that's the question.
              Marty
              ------
              XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
              Playing with HS3 a bit but it's just play at this point.

              Comment


                #8
                So he wants a way to specify a BLRandom action on a word in the BLSpeech dictionary?
                So in the dictionary he would add a word called "yes" and assign it a new field like [BLRandom=yes] and then when BLSpeech found the word yes it would randomize it with the group yes in BLRandom.

                It will not do this now.
                Add a feature request for BLSpeech and be specific.
                Cheers,
                Bob
                Web site | Help Desk | Feature Requests | Message Board

                Comment


                  #9
                  Originally posted by Blade View Post
                  So he wants a way to specify a BLRandom action on a word in the BLSpeech dictionary?
                  So in the dictionary he would add a word called "yes" and assign it a new field like [BLRandom=yes] and then when BLSpeech found the word yes it would randomize it with the group yes in BLRandom.

                  It will not do this now.
                  Add a feature request for BLSpeech and be specific.
                  Exactly, Thanks blade ill add it

                  -Tom-
                  -Tom-

                  Comment


                    #10
                    OK I have added this to newest BLSpeech and BLRandom builds on my web site or in the HS updater for BLSpeech.

                    NOTE
                    You must make sure you run the newest BLSpeech and BLRandom or you will have issues.

                    If you hover the mouse over the underlined field name (target) it will show you how to enter it.

                    Let me know how it works.
                    Last edited by Blade; January 9, 2011, 10:38 AM.
                    Cheers,
                    Bob
                    Web site | Help Desk | Feature Requests | Message Board

                    Comment


                      #11
                      Originally posted by Blade View Post
                      OK I have added this to newest BLSpeech and BLRandom builds on my web site or in the HS updater for BLSpeech.

                      NOTE
                      You must make sure you run the newest BLSpeech and BLRandom or you will have issues.

                      If you hover the mouse over the underlined field name (target) it will show you how to enter it.

                      Let me know how it works.
                      Can't seem to get it to work, I updated both plugins, and added a replacement in the dictionary for "yes" [BLRandom=Yes]

                      And it doesnt seem to work when I press test, and i doing something wrong?

                      -Tom-
                      -Tom-

                      Comment


                        #12
                        Originally posted by twa8000 View Post
                        Can't seem to get it to work, I updated both plugins, and added a replacement in the dictionary for "yes" [BLRandom=Yes]

                        And it doesnt seem to work when I press test, and i doing something wrong?

                        -Tom-
                        I am not sure if I added code to have it work with the test button. I will check on that when I get home.
                        Have you tried it using the speech command to see if that works?
                        Let me know
                        Cheers,
                        Bob
                        Web site | Help Desk | Feature Requests | Message Board

                        Comment


                          #13
                          Originally posted by Blade View Post
                          I am not sure if I added code to have it work with the test button. I will check on that when I get home.
                          Have you tried it using the speech command to see if that works?
                          Let me know
                          i also went to any event-deviceaction-speak. i put in "yes" and it still dont work.

                          It doesn't do the replace with blrandom, but instead of saying yes, it says, [blrandom=yes]

                          -Tom-
                          -Tom-

                          Comment


                            #14
                            Can you capture a debug log of this happening and email it to me ZIPPED up.
                            Thx
                            Cheers,
                            Bob
                            Web site | Help Desk | Feature Requests | Message Board

                            Comment


                              #15
                              Originally posted by Blade View Post
                              Can you capture a debug log of this happening and email it to me ZIPPED up.
                              Thx
                              I will when i get home tonight, when i enable debug mode, where do the debug logs save to?

                              -Tom-
                              -Tom-

                              Comment

                              Working...
                              X