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. Any numeric value is valid input within this attribute. A value of ‘5000’ would indicate a 5 second pause within the TTS output.



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

login



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