VoiceXML 2.1 Development Guide Home  |  Frameset Home


<break>  element


The break element is used to designate a pause in the TTS output, with the length being a user-specified time value in either milliseconds, or of a predetermined ‘size’ variable.


usage

<break size="(none|small|medium|large)" strength="(none|x-weak|weak|medium|strong|x-strong)" time="CDATA">


attributes

size Data Type: (none|small|medium|large) Default: medium
Used to indicate a relative value for the pause length within the TTS output. The equivalent values for this attribute are:
  • small: 2 second pause
  • medium: 5 second pause
  • large: 10 second pause

Note that this attribute has been phased out entirely in favor of the SSML-compliant 'strength' attribute.
strength Data Type: (none|x-weak|weak|medium|strong|x-strong) Default: Optional (medium)
The strength attribute is the SSML-compliant replacement of the older size attribute. The value of this attribute specifies the length of silence appanded/prepended to any TTS output. The allowable values, and their time equivalents are:

  • none -- 0 seconds of silence
  • x-weak -- .35 seconds of silence
  • weak -- .35 seconds of silence
  • medium -- .7 seconds of silence
  • strong -- 1.0 seconds of silence
  • x-strong -- 1.0  seconds of silence
time Data Type: CDATA Default: Optional
The time attribute replaces the non-compliant attribute of 'msecs', used on the VXML 1.0 platform. Value can be specified in seconds or milliseconds. A value of  '5s' or ‘5000ms’ would indicate a 5 second pause within the TTS output. Default (no suffix) is milliseconds.



shadow variables

none


parents

<audio>   <choice>   <emphasis>   <enumerate>   <paragraph>   <prompt>   <prosody>   <sentence>


children

none


code samples

<Break strength-time> sample
<?xml version="1.0" encoding="UTF-8"?>

<vxml version = "2.1">

<meta name="author" content="Matthew Henry"/>
<meta name="copyright" content="2005 voxeo corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>



<form id="F_1">

  <block>
    <prompt>
      We will now force a pause in our T T S output
      starting right here <break strength="weak"/> and then we
      will have another right <break time="2000"/> here.
    </prompt>
  </block>

</form>

</vxml>



additional links

W3C SSML 1.0 Specification


  ANNOTATIONS: EXISTING POSTS
safarishane
8/1/2005 2:55 PM (EDT)
Does the time attribute require either "ms" or "s" to be specified?
harrybr
5/8/2006 9:23 AM (EDT)
You don't need to specify S or MS. If you dont it interprets it as MS, i.e.

<break time="2000"/>

is interpreted as 2000 miliseconds.

Also, I think you need to make sure it is in lower case, i.e <break .... rather than <Break ... Otherwise the voxeo system will just ignore your tag. 

(Please correct me if I am wrong).

MattHenry
5/8/2006 4:02 PM (EDT)


You are indeed correct on all counts, Harry. I should also point out that you can simply specify <break/>, which will insert a pause with a default value of about 2 seconds.

~Matt
PremiseScienceMuseum
9/6/2006 3:10 PM (EDT)
This element does not seem to work if you have nothing else in your <prompt> block.  In other words I can't use it simply as a pause in the logic of my application.  Right?
VoxeoJoe
9/8/2006 5:23 PM (EDT)
Hello ScienceMuseum,

You are correct.  If you simply have only a "break" within a "prompt", it gets ignored.  However, if you do the following, it works:


<prompt>
<break time="1000"/> <break time="1000"/>
</prompt>


It works because the space in-between the two "break" elements will get our TTS to kick-in for that space.


Sincerely,

Joe Gallina
Voxeo Corporation
ranm
6/24/2010 7:05 AM (EDT)
Is it possible to use a variable as the value for the break time?
voxeoJeffK
6/24/2010 7:31 AM (EDT)
Hello,

No, the "time" attribute of <break> is required to be CDATA. What you could do is have multiple wav files of different silence durations. Then use the <audio> tag with the "expr" attribute. Something like:

  <assign name="silenceTime" expr="3"/>
  <audio expr="'path/to/audios/' + silenceTime + '.wav'"/>

This would fetch a file "path/to/audios/3.wav"

Regards,
Jeff Kustermann
Voxeo Support
ranm
10/30/2010 9:45 AM (EDT)
Is it possible to use a variable as the value for the other attributes: size or strength?
voxeoTonyT
10/30/2010 5:25 PM (EDT)
Hello,

Unfortunately the attributes for the break method can only accept the values stipulated for strength and a number value for time.  However, what we recommend for developers is to write your VXML using a some flavor of server side script, such as PHP or JSP.  This will allow you to dynamically render the VXML putting in the values when that particular page is ran.

We have some examples of using server side code [link=http://www.vxml.org/qs_vars.htm]here[/link].  Let us know if this helps or not.

Regards,

Tony Taveras
Customer Engineer
Voxeo Support
polololoco
11/3/2010 10:43 AM (EDT)
The break element only works if I have a TTS server? Is there any other way to add a silence between audio files?

thanks in advance
VoxeoDustin
11/3/2010 6:18 PM (EDT)
Hello,

The break element should work between audio prompts as well:

<prompt> <audio src="myAudioFile1.wav"/> <break time="1000ms"/> <audio src="myAudioFile2.wav"/> </prompt>

Let me know if this does the trick.

Regards,
Dustin Hayre
Solutions Engineer
Voxeo Corporation
moshe
3/14/2011 11:43 AM (EDT)
The VoiceXML 2.0 spec calls for the use of "1s" or alternatively "1000ms." The spec does not support bare numbers such as "3000." See  http://www.w3.org/TR/speech-synthesis/#S3.2.3 (Speech Synthesis Spec, section 3.2.3) which references the CSS2 spec http://www.w3.org/TR/1998/REC-CSS2-19980512/syndata.html#q20

VoxeoDustin
3/14/2011 4:12 PM (EDT)
Hey Moshe,

You are correct. The spec specifies ms or s, however our platform allows this to be omitted and defaults to milliseconds. I have updated the page to reflect this.

Cheers,
Dustin
saxxo
1/5/2012 8:06 AM (EST)
Hello everybody and Happy New Year !

I use the VXML 2.0 and the <break /> instruction is not interpreted.
It is read like the other words in the message.
My VXML file is valid and no error is detected during the code execution.

The syntax seems correct :

<prompt>
    Hello World <break time="2000ms"/> See you soon
</prompt>

Can it be a server configuration or file header issue ?

<?xml version = "1.0"?>
<!DOCTYPE vxml PUBLIC '' "http://www.w3.org/TR/voicexml20/vxml.dtd">
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">

I tried <break />, <break strength="medium"/> or <break time="2000ms"/> without success...

Thanks and forgive my English.

Marc

voxeojeremyr
1/5/2012 10:38 AM (EST)
Hello Marc,

I tried to replicate the issue that you are seeing with the <break> element, but in my test the <break...> behaved as it should.

Are you using a local installation of Prophecy?  If so, can you tell me what version you are using?

Standing by,
Jeremy Richmond
Voxeo


login



© 2012 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site