Announcement

Collapse
No announcement yet.

SAPI tags and string variables

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

  • Uncle Michael
    replied
    Thank you. I'll give that a go.

    That did the trick.
    Last edited by Uncle Michael; March 1, 2016, 12:37 PM.

    Leave a comment:


  • mrhappy
    replied
    Originally posted by Uncle Michael View Post
    Is there a way to include SAPI tags within a string variable?

    I can create script line like,
    hs.Speak("some text" <SAPI tag> "some more text")

    I can also create a line like,
    hs.Speak(string)
    where 'string' is a string variable

    What I haven't been able to figure out is how to combine SAPI control tags and string variables in the hs.Speak function. Specifically, I'd like to include pauses in the string with <silence msec="1000"/>, for example. Is it possible? How?
    The quickest and simplest is to use double quotes, because a single quote is what VB thinks is the end of a string that is why it will error...there may be some class out there that can add SAPI tags but if you are happy writing them out by hand then you would do;

    hs.Speak("some text <silence msec=""1000""/> some more text")

    VB.net will interpret the double quotes as the fact that you want to put a single quote in the string. They are not processed inside HS (done in the PC speech engine).

    Leave a comment:


  • Uncle Michael
    started a topic SAPI tags and string variables

    SAPI tags and string variables

    Is there a way to include SAPI tags within a string variable?

    I can create script line like,
    hs.Speak("some text" <SAPI tag> "some more text")

    I can also create a line like,
    hs.Speak(string)
    where 'string' is a string variable

    What I haven't been able to figure out is how to combine SAPI control tags and string variables in the hs.Speak function. Specifically, I'd like to include pauses in the string with <silence msec="1000"/>, for example. Is it possible? How?
Working...
X