How to Use Dragons Speech Synthesiser

Hi all

I have been hunting around trying to find out how to use Dragons speech synthesiser through Python / NatLink. Do you know if you can and if so how? I came across a forum with TTSPlayString() but isnt this Vocola? Do I have to use natlink.execScript() ?

Thanks for any help you can provide.

Angela

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Chuck Runquist's picture

TTSPlayString() is a DNS command

wigsta wrote:

Hi all

I have been hunting around trying to find out how to use Dragons speech synthesiser through Python / NatLink. Do you know if you can and if so how? I came across a forum with TTSPlayString() but isnt this Vocola? Do I have to use natlink.execScript() ?

Thanks for any help you can provide.

Angela

Angela,

While I can't help you with Vocola (i.e., someone who uses it persistently will have to help you out there), TTSPlayString() is a Dragon NaturallySpeaking Advanced Scripting command. It has nothing to do with Natlink or Vocola.

Chuck Runquist
Former Dragon NaturallySpeaking SDK & Senior Technical Solutions PM for DNS

If computers get too powerful, we can organize them into a committee - that will do them in. - Bradley's Bromide

Hi Chuck Thank you for your

Hi Chuck

Thank you for your reply. Yes, I was trying to find out whether this could be used through NatLink somehow. I came across a forum with it being used like this:

natlink.execScript ("TTSPlayString \"" +k+ "\"")

but it didnt work for me (not sure about the \"" "\"") part.

Thanks
Angela

Chuck Runquist's picture

wigsta wrote: Hi

wigsta wrote:

Hi Chuck

Thank you for your reply. Yes, I was trying to find out whether this could be used through NatLink somehow. I came across a forum with it being used like this:

natlink.execScript ("TTSPlayString \"" +k+ "\"")

but it didnt work for me (not sure about the \"" "\"") part.

Thanks
Angela

Angela,

TTSPlayString in Advanced Scripting has the following syntax:

TTSPlayString ""

For example, TTSPlayString "Now is the time for all good men to come to the aid of their country"

How you would incorporate this into Vocola, I'm not sure because I don't use Vocola enough to be able to clearly indicate how to do this. My guess is that it should be possible. However, you would have to use the proper syntax regardless of how it is invoked via Vocola.

Keep in mind also that you can't just include anything with this command line. It has to be text, and it has to be readable text. Otherwise, all you get is garbage even if the syntax is correct. Its primary use is for read back using the TTS engine in DNS. For example, I use it with a command for putting the microphone into sleep mode. This syntax is:

TTSPlayString "it's OK to go and take a nap my Liege"

You should also avoid symbols and punctuation. The only purpose for TTS playback is to provide you with a prompt. For example, if you are using the professional versions, you can modify the system.dvc file to wake up the microphone and prompt you that DNS is active.

I use the command "please wake up" in my system.dvc file, which prompts me with:

TTSPlayString "at your service my Liege"

Capitalization isn't necessary either, although it doesn't hurt.

In any event, TTS playback only reads using the RealSpeak TTS speaker (i.e., Jennifer US English) to speak that text associated with the command line. If your intention is to get it to write something, that simply will not work. Nor will it work very effectively for obscure text. I'm not sure what the\"" +k+ "\"" is supposed to do, but my guess is that, regardless, the initial " before TTSPlayString and the ending " inside of the parentheses will not work even in Vocola.

Chuck Runquist
Former Dragon NaturallySpeaking SDK & Senior Technical Solutions PM for DNS

"We learn by doing." -- Aristotle

Thank you

Hi Chuck

Thank you for your help and explanation. I have worked out how to use Dragons TTS in Python. For any one else out there looking for the same info, here is the code:

natlink.execScript('TTSPlayString("Say this text")')

Thanks again
Angela

Using it from vocola, don't

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.




view recent posts