Author Topic: text to speech commands/flow  (Read 5169 times)

neosky5k

  • Guest
text to speech commands/flow
« on: January 20, 2017, 08:09:05 PM »
Any one know how to control the flow of speech?  I know there is Rate, but that is over the whole text.  I need some thing that controls what it's saying on a specific line.

Also anyone know the hidden commands, tokens and such?

I'm trying to have my T2S say something but she says it too fast and it sounds bad, but the second line it sounds fine...
using {txt:X}.  I've tried , ? . all these to change the tone, but it only works on the second line.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: text to speech commands/flow
« Reply #1 on: January 21, 2017, 03:38:46 AM »
You can use SSML to do it, if you check the "Use Speech Synthesis Markup Language (SSML)" option in the "Say Something with Text-To-Speech" action.

Look at the section "prosody Element" for rate control.

neosky5k

  • Guest
Re: text to speech commands/flow
« Reply #2 on: January 21, 2017, 04:04:43 PM »
oh, ok.  Well I haven't updated since 1.5, so i didn't know about that.

I clicked that box after updating, now it doesn't say anything at all. 
Is there a tutorial place for this SSML?

ex:
current system is, {TXT:current}.

That is what I have right now.  but it says the Current fast even at -2.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: text to speech commands/flow
« Reply #3 on: January 21, 2017, 04:15:48 PM »
To slow down words or parts of a sentence:
Code: [Select]
<?xml version="1.0"?>
<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.w3.org/2001/10/synthesis
                   http://www.w3.org/TR/speech-synthesis/synthesis.xsd"
         xml:lang="en-US">
<prosody rate="-50%">current</prosody> system is, {TXT:current}.
</speak>
This slows down "current", but speaks the rest at the normal setting.

neosky5k

  • Guest
Re: text to speech commands/flow
« Reply #4 on: January 21, 2017, 04:20:22 PM »
oh it has to be coded, like html or something. Well then that's different. XD

So how do I have it choose my actual default voice?  It's using the old Microsoft ones.

Also it's the {TXT:current} that's needs the slow down, sorry, I didn't even think about the other word current, XD.

Thank you for helping, by the way.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: text to speech commands/flow
« Reply #5 on: January 21, 2017, 04:35:00 PM »
Two things you can try:
If your voice is not US English, change the "en-US" to the appropriate language

Or, if it is, specify the voice it should use by name:
Code: [Select]
<?xml version="1.0"?>
<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.w3.org/2001/10/synthesis
                   http://www.w3.org/TR/speech-synthesis/synthesis.xsd"
         xml:lang="en-US">
<voice name="Microsoft Anna - English (United States)">
current system is, <prosody rate="-50%">{TXT:current}.</prosody>
</voice>
</speak>

neosky5k

  • Guest
Re: text to speech commands/flow
« Reply #6 on: January 21, 2017, 04:42:49 PM »
Awesome, that worked.

I had to place - IVONA 2 Gweyneth

I'll mess around with it now, and see what I can do.  Thank you so much!

Now I'm wondering what else is new from 1.5 to 1.6, probably missing out on new things!

To get it to have different choices of what to say, I just need to use the whole variable choice thing.

Have it choose a variable number, then choose under that number what to say huh?  since I can't use ; now.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: text to speech commands/flow
« Reply #7 on: January 21, 2017, 05:13:48 PM »
I had to place - IVONA 2 Gweyneth
Ah, Gweyneth should be en-GB, try
Code: [Select]
<?xml version="1.0"?>
<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.w3.org/2001/10/synthesis
                   http://www.w3.org/TR/speech-synthesis/synthesis.xsd"
         xml:lang="en-GB">
current system is, <prosody rate="-50%">{TXT:current}.</prosody>
</speak>

since I can't use ; now.
Hmm...You can, but it doesn't work when embedding multiple options inside eachother  tag, which is odd.

Bug report filed here.

neosky5k

  • Guest
Re: text to speech commands/flow
« Reply #8 on: January 21, 2017, 05:18:07 PM »
That worked great, thanks!

I love that English Welsh.

Thanks again!