Announcement

Collapse
No announcement yet.

Speaker Client - not speaking all lines entered

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

    Speaker Client - not speaking all lines entered

    Hi, I just purchased this PI and a couple of Mini's for the speaking aspect. I am keeping hte Mic's off and only intend to use as HS Speaking clients. Not sure all that was needed but ok.

    So I m running a script that speaks the weather and so far it is being logged correctly but not spoken correctly. only the first and last lines are being spoken. Is there something I need to do to have the mini's speak the rest?
    Jul-24 7:12:07 PM TTS Speak ():Have a nice Day.
    Jul-24 7:12:07 PM TTS Speak ():Isolated Showers then Mostly Clear
    Jul-24 7:12:07 PM TTS Speak ():
    Jul-24 7:12:07 PM TTS Speak ():The current Outside temerature is 84 degrees, which feels like 84 degrees.
    Jul-24 7:12:03 PM TTS Speak ():Good morning, it is 19:12
    Jul-24 7:12:03 PM Event Running script in background: C:/Program Files (x86)/HomeSeer HS3/scripts/Good_Morning.txt
    Here is a few lines of what it is trying to speak.

    hs.speak "Good morning, it is " & FormatDateTime(Time,vbShortTime),true
    hs.WaitSecs 1
    hs.speak "The current Outside temerature is " & CurTemp & " degrees, which feels like " & FeelLikeTemp & " degrees."

    The variables are from device values. If the wait is put to 3 then it will speak upto and only part of temperature on the 3rd line. Then speak he very last line in the log file.
    -Skybolt

    #2
    can you post the full script?
    If you use several Speak action in a row, you need to add wait between each.
    An easier way to do it would be to append all the text in one string and then only send one Speak action

    Comment


      #3
      Is there something I need to do to have the mini's speak the rest?

      I would not think so.

      What do the logs show in the two speaker clients?


      - Pete

      Auto mator
      Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb- Mono 6.12.X
      Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.12.X
      HS4 Pro - V4.1.7.0 - Ubuntu 18.04/VB W7e 64 bit Intel Kaby Lake CPU - 32Gb - Mono 6.12.x
      HS4 Lite -

      X10, UPB, Zigbee, ZWave and Wifi MQTT automation. OmniPro 2, Russound zoned audio, Smartthings hub, Hubitat Hub, and Home Assistant

      Comment


        #4
        Originally posted by spud View Post
        can you post the full script?
        If you use several Speak action in a row, you need to add wait between each.
        An easier way to do it would be to append all the text in one string and then only send one Speak action
        It's jsut a continuation of what is posted. I have pauses in between phrases to sound correct. Concatinating them would sound wierd. Each line gets one or two device values, some are long values with the morning/night forcast.

        So is there a way of fixing this, or is this what I can expect to happen?

        EDIT:

        Sub Main()

        Dim CurTemp
        Dim FeelLikeTemp
        Dim tmpToday
        Dim tmpTonight

        CurTemp = hs.devicevalue(974)
        FeelLikeTemp = hs.devicevalue(980)

        tmpToday = hs.devicestring(1004)
        tmpTonight = hs.devicestring(997)

        hs.speak "Good morning, it is " & FormatDateTime(Time,vbShortTime),true
        hs.WaitSecs 3
        hs.speak "The current Outside temerature is " & CurTemp & " degrees, which feels like " & FeelLikeTemp & " degrees."

        hs.WaitSecs 2
        hs.speak tmpToday
        hs.WaitSecs 2
        hs.speak tmpTonight
        hs.WaitSecs 2
        hs.speak "Have a nice Day."

        End Sub
        -Skybolt

        Comment


          #5
          Originally posted by Pete View Post
          Is there something I need to do to have the mini's speak the rest?

          I would not think so.

          What do the logs show in the two speaker clients?

          Hey Pete, Where are the logs? the one in .\data are empty.
          -Skybolt

          Comment


            #6
            In the log transcript of post #1, note the times on the five speak() entries - the final four occur at the same time, four seconds after the first.

            The times in your script aren't long enough to say those phrases. Try increasing the delays.

            You have a typo in one of the phrases: "temerature" should be "temperature".

            Comment


              #7
              Originally posted by zwolfpack View Post
              You have a typo in one of the phrases: "temerature" should be "temperature".
              LOL - Thanks.

              Yeah the increased time only extends the pause.

              If there were a way of pausing the speach in the text string then one long string would work. Comma's aren't enough of a pause.

              -Skybolt

              Comment


                #8
                Google "SAPI tags". This looks promising: https://www.w3.org/TR/speech-synthesis/#S3.2.3

                I don't know if this'll work, but worth a try. Insert <break time="2s"/> and see what happens.

                Edit: seems to work well!

                Comment


                  #9
                  Where are the logs? the one in .\data are empty.


                  Open the speaker clients. The logging is live. I am not sure if it is saved anyplace.
                  - Pete

                  Auto mator
                  Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb- Mono 6.12.X
                  Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.12.X
                  HS4 Pro - V4.1.7.0 - Ubuntu 18.04/VB W7e 64 bit Intel Kaby Lake CPU - 32Gb - Mono 6.12.x
                  HS4 Lite -

                  X10, UPB, Zigbee, ZWave and Wifi MQTT automation. OmniPro 2, Russound zoned audio, Smartthings hub, Hubitat Hub, and Home Assistant

                  Comment


                    #10
                    Originally posted by zwolfpack View Post
                    Google "SAPI tags". This looks promising: https://www.w3.org/TR/speech-synthesis/#S3.2.3

                    I don't know if this'll work, but worth a try. Insert <break time="2s"/> and see what happens.

                    Edit: seems to work well!
                    hmm ... I couldn't get it to work with the device variables.

                    How did you insert this?
                    -Skybolt

                    Comment


                      #11
                      You asked "If there were a way of pausing the speech in the text string then one long string would work." This does exactly that.
                      Attached Files

                      Comment


                        #12
                        Originally posted by zwolfpack View Post
                        You asked "If there were a way of pausing the speech in the text string then one long string would work." This does exactly that.
                        Ah - yes it works like that, but I can't seem to get it to work in a script. I quite get the quotes right I guess.
                        -Skybolt

                        Comment


                          #13
                          Originally posted by zwolfpack View Post
                          You asked "If there were a way of pausing the speech in the text string then one long string would work." This does exactly that.
                          So I must have something else going on. If I just put $$time in the same event window as you show there, HS speaks the equivelant code character by character, meaning it starts by speaking "less then" "dollar" "dollar" "time" -etc. it actually says somthing wierd for the dollar sign. sounds like "sayes". The rest of the speaking scripts/events act in the same manner.

                          If I put this "&hs.speak time" in the contro lwindow - Immediate script command - it speaks the time correctly.


                          Spud can you look at this and please and comment on what is going on if you can please -Thanks.
                          -Skybolt

                          Comment


                            #14
                            When you use 2 dollar signs, HS automatically replace the string with SAPI tags
                            $$time => <say-as type="time">8:09 AM</say-as>

                            The google voice in the Chromecast plugin does not support the SAPI tags, so it says the "say-as" tags

                            the fix for this is to use only one dollar sign, which will not add the SAPI tags
                            $time => 8:09 AM
                            Note that the google voice is able to pronounce that well without the tags:
                            https://help.homeseer.com/help/HS3/s...ment_variables

                            Now regarding the <break> tag, Google voice does not support it so it won't work. If you choose Voice=System in the Chromecast plugin config page, it may or may not work depending on the voice configured on your system. I believe some supports SAPI tags some other don't

                            Comment


                              #15
                              Originally posted by spud View Post
                              When you use 2 dollar signs, HS automatically replace the string with SAPI tags
                              $$time => <say-as type="time">8:09 AM</say-as>

                              The google voice in the Chromecast plugin does not support the SAPI tags, so it says the "say-as" tags

                              the fix for this is to use only one dollar sign, which will not add the SAPI tags
                              $time => 8:09 AM
                              Note that the google voice is able to pronounce that well without the tags:
                              https://help.homeseer.com/help/HS3/s...ment_variables

                              Now regarding the <break> tag, Google voice does not support it so it won't work. If you choose Voice=System in the Chromecast plugin config page, it may or may not work depending on the voice configured on your system. I believe some supports SAPI tags some other don't
                              Ok, got it. I switched to the system voice as I have very nice voices added to the system. That totally worked with the break embedded in the quote -

                              &hs.speak "Turning the house off <break time='1s'/> good night." That was from the control window. The extended script now works very well also.

                              Thank you for that information! This now allows me to have minis around the house for notifications and not have to open up walls to run wire.
                              -Skybolt

                              Comment

                              Working...
                              X