Author Topic: text.to.speech inline pause  (Read 3100 times)

foxpur

  • Newbie
  • *
  • Posts: 24
text.to.speech inline pause
« on: April 17, 2017, 07:47:35 AM »
ok, pretty basic but for some reason I'm not getting it...

tried {} and [] and it still doesn't work as a command:

say "I am? [PAUSE:5.5] How am I doing that?"
« Last Edit: April 17, 2017, 07:57:57 AM by foxpur »

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4780
  • RTFM
Re: text.to.speech inline pause
« Reply #1 on: April 17, 2017, 10:36:59 AM »
The "[PAUSE;]" marker is used only in the "Quick Input" action, it is not compatible with the "Say Something with Text-To-Speech" action.

The simplest way to add a pause is to use the actual "Pause" action:
Code: [Select]
Say, 'I am?'
Pause 5,5 seconds
Say, 'How am I doing that?'

You can also use SSML:
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">
I am?<break time="5.5s"/>How am I doing that?
</speak>
Make sure you check the "Use Speech Synthesis Markup Language (SSML)" option.

foxpur

  • Newbie
  • *
  • Posts: 24
Re: text.to.speech inline pause
« Reply #2 on: April 17, 2017, 10:55:58 AM »
Thing is I need it in the "Say Something with Text-To-Speech" action.
I have several random to chose from in this plan.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4780
  • RTFM
Re: text.to.speech inline pause
« Reply #3 on: April 17, 2017, 11:34:55 AM »
You can still use dynamic response sections when SSML is enabled:
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">
[option 1;option2;I am?<break time="5.5s"/>How am I doing that?;option 4]
</speak>

foxpur

  • Newbie
  • *
  • Posts: 24
Re: text.to.speech inline pause
« Reply #4 on: April 17, 2017, 12:34:26 PM »
Oh, well then, I will give that a try shortly.