Announcement

Collapse
No announcement yet.

Speak <voice required

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

    Speak <voice required

    What's wrong with the following?

    hs.Speak("<voice required='Name=ATT DTNV 1.3 Mike16'>This Is Mike speaking")

    I know that the name of the voice is correct because if I use
    hs.SetVoice("ATT DTNV 1.3 Mike16")
    hs.Speak("This is Mike speaking") it speaks just fine

    I also tried this with no luck
    hs.Speak("<voice required='Name=ATT DTNV 1.3 Mike16'>This in Mike Speaking.</voice>", True)

    #2
    Originally posted by noopara View Post
    What's wrong with the following?

    hs.Speak("<voice required='Name=ATT DTNV 1.3 Mike16'>This Is Mike speaking")

    I know that the name of the voice is correct because if I use
    hs.SetVoice("ATT DTNV 1.3 Mike16")
    hs.Speak("This is Mike speaking") it speaks just fine

    I also tried this with no luck
    hs.Speak("<voice required='Name=ATT DTNV 1.3 Mike16'>This in Mike Speaking.</voice>", True)
    Try:
    hs.Speak("<voice required='Name=ATT DTNV 1.3 Mike16'>This Is Mike speaking</voice>")
    It appears you left off the closing </voice> tag.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      Originally posted by Rupp View Post
      Try:
      hs.Speak("<voice required='Name=ATT DTNV 1.3 Mike16'>This Is Mike speaking</voice>")
      It appears you left off the closing </voice> tag.
      I did try it with the closing tag here...
      hs.Speak("<voice required='Name=ATT DTNV 1.3 Mike16'>This in Mike Speaking.</voice>", True)

      ...and it didn't work either.

      ??

      Comment


        #4
        How are you running this? Are you using an immediate script command?
        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

        Comment


          #5
          hs.Speak("<voice required='ATT DTNV 1.3 Mike16'>This in Mike Speaking.</voice>", True)

          Try this one without the name= part

          Another option is to put both commands on one line like
          hs.SetVoice("ATT DTNV 1.3 Mike16") : hs.Speak("This is Mike speaking")

          Ps, i don't know for sure if the separator must be a : or a ;
          - Bram

          Send from my Commodore VIC-20

          Ashai_Rey____________________________________________________________ ________________
          HS3 Pro 3.0.0.534
          PIugins: ZMC audio | ZMC VR | ZMC IR | ZMC NDS | RFXcom | AZ scripts | Jon00 Scripts | BLBackup | FritzBox | Z-Wave | mcsMQTT | AK Ikea

          Comment


            #6
            Rupp, I would like the flexibility to change the voice in this way in both an Immediate Script as well as in a vb.net script.

            AshaiRey, by removing the "Name=" from the command as follows:
            &hs.Speak("<voice required='ATT DTNV 1.3 Mike16'>This in Mike Speaking.</voice>", True)
            ...doesn't work either in an Immediate command. The HS log does show though TTS Speak: (*efault):This is Mike Speaking. So, there is no syntax error. Maybe it's a timing problem?

            This Immediate command worked:
            &hs.SetVoice("ATT DTNV 1.3 Mike16") : hs.Speak("This is Mike speaking") : hs.WaitSecs(3) : hs.SetVoice("VW Kate 16k") : hs.Speak("This is Kate Speaking")

            If the 3 second delay is omitted, Mike's voice will speak "This is Kate Speaking"

            I wish it could change the voice faster. I tried 2 seconds and it would not make the voice change. It needs at least 3 seconds.

            For some reason the tag
            <voice required='ATT DTNV 1.3 Mike16'>, or with double quotes
            <voice required=""ATT DTNV 1.3 Mike16"">
            won't work??
            I also tried some of the other voices and they don't work either with the voice required tag.

            I tried it on my HS2 system (on an XP box) and it doesn't work either.

            Has anyone got this to work???
            Last edited by noopara; December 31, 2016, 02:21 PM.

            Comment


              #7
              Maybe this gets you a bit further to your goal by adding , TRUE to your speak command. The ,TRUE part wait for speech to be finished before continuing.
              hs.speak info
              - Bram

              Send from my Commodore VIC-20

              Ashai_Rey____________________________________________________________ ________________
              HS3 Pro 3.0.0.534
              PIugins: ZMC audio | ZMC VR | ZMC IR | ZMC NDS | RFXcom | AZ scripts | Jon00 Scripts | BLBackup | FritzBox | Z-Wave | mcsMQTT | AK Ikea

              Comment


                #8
                Originally posted by noopara View Post
                What's wrong with the following?

                hs.Speak("<voice required='Name=ATT DTNV 1.3 Mike16'>This Is Mike speaking")
                I just tried this (but with different voices) and it works fine here. Have you tried:

                hs.Speak("<voice required='Name=Mike16'>This Is Mike speaking")
                [/QUOTE]
                Jon

                Comment


                  #9
                  And the Answer is...

                  Interesting...

                  Jon, thanks for looking at this.

                  I think I have broken the code on this problem

                  This does work as it worked for you
                  hs.Speak("<voice required='Name=Mike16'>This Is Mike speaking")
                  and these all worked
                  &hs.Speak("<voice required='Name=Microsoft Anna'>This is Anna speaking")
                  &hs.Speak("<voice required='Name=Claire16'>This is Claire speaking")
                  &hs.Speak("<voice required='Name=VW Paul 8k'>This is Paul speaking")
                  &hs.Speak("<voice required='Name=VW Kate 8k'>This is Kate speaking")
                  &hs.Speak("<voice required='Name=Crystal16'>This is Crystal speaking")

                  None of these work
                  hs.Speak("<voice required='Name=VW Kate 16k'>This Is Kate speaking")
                  hs.Speak("<voice required='Name=Kate16'>This Is Kate speaking")
                  hs.Speak("<voice required='Name=Kate16k'>This Is Kate speaking")
                  hs.Speak("<voice required='Name=Kate 16'>This Is Kate speaking")
                  hs.Speak("<voice required='Name=Kate 16k'>This Is Kate speaking")
                  hs.Speak("<voice required='Name=VWKate16k'>This Is Kate speaking")

                  When I did the above tests VW Kate 16k was set as the voice in the Speaker app Options panel. When I changed it to something else, this worked
                  hs.Speak("<voice required='Name=VW Kate 16k'>This Is Kate speaking")
                  None of the other permutations on VW Kate 16k worked.

                  So, the <voice required> tag will only change the voice to something other than what is set as the "default" voice in the Speaker app. That makes sense if you think of the tag as being a temporary replacement.

                  This works in a vb.net script
                  hs.Speak("<voice required='Name=Mike16'>This in Mike Speaking.</voice><voice required='Name=Claire16'>This in Claire Speaking.</voice>", True)
                  There is little delay from the time the script is launched to when it starts speaking and no delay between the voices.
                  When this is run in an Immediate Script command there is a long (almost a minute) before the voices are actually spoken also with no delay between the voices. I wonder why it takes so long in this case?

                  I am running this on a Win7 Pro 64bit box. I discovered that the Registry entries for Speech Voices for a 64bit machine are are under
                  HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Speech\Voi ces\Tokens

                  There you can see what the Name attribute is which is what you have to use in the sapi tags. The 'Name= portion of the <voice required> tag must be used. "Name" is one of the listed attributes for each voice.

                  Note that when the hs.SetVoice("Voice name") command is used in a script or an immediate command that it changes the default voice used even though that the voice shown in the drop down box in the Speaker/Options box does not change from what it was before.

                  Thanks to all that contributed to this thread.

                  Comment


                    #10
                    Ok, call me stupid but I can't get anything to work. It just speaks the string without changing the voice. Basically there is no translation at all.

                    I'm using spuds AirSpeak but I'm assuming that this gets sent through "speak_to_file.sh" at some point well before it hits AirPlay.

                    All I want to do is change from that garbage default voice to slt, much more pleasant, for all speaking.

                    I also can't find anything about hs.SetVoice in any of the docs.
                    Last edited by Timon; January 27, 2018, 09:13 AM.
                    HomeSeer Version: HS3 Standard Edition 3.0.0.548
                    Linux version: Linux auto 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
                    Number of Devices: 484 | Number of Events: 776

                    Enabled Plug-Ins: 3.0.0.13: AirplaySpeak | 2.0.61.0: BLBackup
                    3.0.0.70: EasyTrigger | 1.3.7006.42100: LiftMaster MyQ
                    4.2.3.0: mcsMQTT | 3.0.0.53: PHLocation2 | 0.0.0.47: Pushover 3P
                    3.0.0.16: RaspberryIO | 3.0.1.262: Z-Wave

                    Z-Net version: 1.0.23 for Inclusion Nodes
                    SmartStick+: 6.04 (ZDK 6.81.3) on Server

                    Comment

                    Working...
                    X