Announcement

Collapse
No announcement yet.

Possible feature request, maybe.

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

    Possible feature request, maybe.

    Blade:

    I'm not sure exactly where this needs to be so I'm leaving it up to you. It could be either BLMediaPlayer or BLSpeech. I'll try to explain what I'm doing so you hopefully get a better understanding of what's happening.

    I use BLSpeech as my speech processor. I let it handle all the speaker management through events, using either the "HomeSeer Prior to Speaking" or the "HomeSeer Stops Speaking triggers". It's been working really well for a couple of years now.

    I use BLMediaPlayer to play a playlist of music during my morning routines. It also has been working quite well for years.

    Now my problem.

    My wife asked if it would be possible have a little attention type sound play before whatever announcement. I figured this would be easy so I went into BLSpeech and used the "Event or Script to execute prior to HomeSeer speaking" under options to trigger an event that plays a wav file of a couple of beeps before speaking. It worked like a champ all that day. Request fulfilled, WAF increased, or so I thought!

    The next morning during our morning events I noticed the unintended consequences. Since BLMediaPlayer is playing during any morning announcements this is where the problem became readily apparent. Two things happened.

    First, I noticed that the music paused as it should have but after the wav file played the music came back on for a second and then paused again for the speech. I have been able to solve this by increasing the length of the wav file from 1 second to just over 2.5 seconds, the pause is still there you just don't notice it now.

    Second, The music paused as I expected but resumed playing too early, like during the end of whatever announcement was running. I have BLSpeech set for a 3 second delay before speaking to allow speakers to be connected and ready. This 3 seconds is just about the same time frame that is giving me problems. since 2.5 to 3 seconds is about the amount of time that has given me grief, both before and after announcements only while music is playing.

    Well, there's my problem. I'm not sure where or how to fix it. I'm thinking that BLSpeech is fine and it's working as it should be but that BLMediaPlayer is not pausing long enough for the speech to complete before it starts playing again. I don't see any way to increase the amount of time that music is paused. I have tried setting the speech delay to 0 in BLSpeech but that made no difference and the music un-paused to early.

    I'm open to any thoughts or suggestions and I'd put in a feature request if I knew what to request.

    Maybe a user setting to lengthen the pause for speech by x seconds.

    Or maybe

    BLMediaPlayer just needs to pause a bit longer for speech in general? Even when run without BLSpeech being enabled it's very close and often will un-pause and start playing during the last word of an announcement.
    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.

    #2
    I've been playing with this a little more this morning. I'm thinking that the biggest problem is BLMediaPlayer un-pausing just a tad too soon after HS speaking has finished. BLSpeech seems to exacerbate the issue some but I don't think that's the problem.

    Maybe it's not a feature request but more of a small bug report?

    Unless of course it's just me, has anyone else running BLMediaPlayer during speaking events notice this?
    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
      Have you tried executing an event or script after speaking in BLSpeech. You can then specify a delay after speaking.
      You could just have the event or script not do anything and see if that helps.
      Cheers,
      Bob
      Web site | Help Desk | Feature Requests | Message Board

      Comment


        #4
        Originally posted by Blade View Post
        Have you tried executing an event or script after speaking in BLSpeech. You can then specify a delay after speaking.
        You could just have the event or script not do anything and see if that helps.
        I do use an event after speaking in BLSpeech to turn off the appropriate speakers. I do have a slight delay in that event but I don't think that's where my problem is.

        I believe it to be in BLMediaPlayer. The music pauses when speaking happens. My problem is it un-pauses and I get music playing along with whatever announcement was triggered going at the same time. It seems like the music just un-pauses itself a second or two too soon.
        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
          Have you tried using the before and after speaking events or scripts in BLSpeech instead of doing it in BLMediaPlayer?
          You could then execute a pause in the before event/script and a play in the after event/script in BLSpeech

          Give that a try and see if it helps.
          Cheers,
          Bob
          Web site | Help Desk | Feature Requests | Message Board

          Comment


            #6
            Maybe I'm being dense and not understanding here but that's the way I do it now. I just don't see anywhere in an event or script how I would be able to delay Ballplayer from resuming play after HS speaking is done?
            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


              #7
              OK can you explain exactly how the process works for you.
              Explain what plugin is doing what and that will help me understand how you are doing it.

              I know BLMediaPlayer can pause and play within the plugin itself without using BLSpeech but I want to know how you are doing it. Be as detailed as you can.
              Thx
              Cheers,
              Bob
              Web site | Help Desk | Feature Requests | Message Board

              Comment


                #8
                I think if we for the most part take BLSpeech out of the mix it'll be easier to understand my dilemma. Perhaps I confused the issue even bringing it up. For one of the tests I did I had completely shut down BLSpeech, it didn't make that much difference.

                When I boil it down to it's lowest common denominator my problem is simply that BLMediaPlayer is un-un-pausing after speech too soon.

                If music is playing and an announcement comes on the music pauses as it should for the start of the announcement, however it un-pauses and goes back to playing before the announcement has finished. The end result being that I have music playing and announcements going all at the same time for the last 2 seconds of the announcement.

                If BLMediaPlayer held the pause for an extra 2 seconds before resuming music all would be well.

                The only real reason I brought up BLSpeech is because when that is in the mix as well it seems to add 1 second to the the amount of music and speech that are happening at the same time. It would not be a big deal at all if BLMediaPlayer didn't resume music too early to start with.

                To me I can only see two ways to get around this here.

                1. either give a setting in BLMediaPlayer to allow a user settable delay before the music resumes after an announcement

                2. Just have BLMediaPlayer wait an extra 2 seconds after speaking stops before resuming play.

                Hopefully this makes it clearer than post #1, if not I'll try again.
                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


                  #9
                  OK I understand.

                  A question for you...

                  Do you speak your messages to HS so that HS waits until the speaking is done before resuming? This could have an effect on it.
                  Cheers,
                  Bob
                  Web site | Help Desk | Feature Requests | Message Board

                  Comment


                    #10
                    Originally posted by Blade View Post
                    OK I understand.

                    A question for you...

                    Do you speak your messages to HS so that HS waits until the speaking is done before resuming? This could have an effect on it.
                    I think the answer is yes but I'm not 100% clear on the question. Most of my speaking events are fueled via scripts, funneled through BLSpeech using the event triggers of the BLSpeech plug-in. The prior to speaking and the HS stops speaking being the two I use.

                    Small example of one of the speaking scripts below. All follow the same general format.

                    PHP Code:
                    Public Sub Main(ByVal Parms As Object
                        
                    Dim speakMsg As String "" 
                        
                    speakMsg speakMsg " Attention Everyone, , , "
                        
                    speakMsg speakMsg hs.DeviceString("Z89") & ". . Again! " hs.DeviceString("Z89")
                        
                    speakMsg speakMsg.Replace("IS""is")
                        
                    hs.Speak(speakMsg
                        
                    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


                      #11
                      Ah... I see from your script that you use:

                      hs.Speak(speakMsg)

                      This will cause HS to not wait until the speech is done before continuing. This could cause a delay issue like you are seeing.
                      Try doing it like this:

                      hs.Speak(speakMsg, True)

                      If you use BLSpeech then all speech is forced to wait, otherwise you get some strange behaviour.
                      Cheers,
                      Bob
                      Web site | Help Desk | Feature Requests | Message Board

                      Comment


                        #12
                        Oh, I didn't know that. OK let me make a few changes and run some tests and I'll get back to you.
                        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


                          #13
                          Bob:

                          I made the changes you suggested in my speaking scripts and let the morning alarms and events run. I also ran a few tests with BLMediaPlayer playing and again with it not playing. To be honest I didn't see that much difference. All works well and as it should if BLMediaPlayer is not playing anything. When it is playing the music still comes back on about 2 seconds too early and I get music and speech going at the same time for those last two seconds of the announcement.

                          I also tried this using the HS-MediaPlayer Plug-in and it does not have the same problem. Leads me to believe it's just a timing issue for BLMediaPlayer and it needs to hold the pause just a little longer than it does?

                          After lots of testing I've come to the conclusion that I'm coming up against two little problems not one. The first being BLMediaPlayer resumes playing too soon after an announcement. The second that HomeSeer seems to treat a Wav file very different from a speaking announcement as far as what happens to music when a TTS event is going. For now I've discontinued trying to play a small wav file before speaking so that I can work on one problem at a time. I think I'm starting to confuse myself as much as you.

                          I think for now if we can get BLMediaPlayer to not un-pause itself until the announcement is really done, that would be great.
                          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


                            #14
                            OK I will add an option to delay after speaking in BLMediaPlayer.
                            Cheers,
                            Bob
                            Web site | Help Desk | Feature Requests | Message Board

                            Comment


                              #15
                              Thanks Bob, I appreciate it. Do you want me to put in a feature request or bug report or are you on top of it?
                              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

                              Working...
                              X