| VoiceXML 2.1 Development Guide | Home | Frameset Home |
| 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:
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:
| ||
| 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. | ||
| <?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> |
| ANNOTATIONS: EXISTING POSTS |
safarishane
|
|
| Does the time attribute require either "ms" or "s" to be specified? | |
harrybr
|
|
| 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
|
|
|
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
|
|
| 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
|
|
| 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
|
|
| Is it possible to use a variable as the value for the break time? | |
voxeoJeffK
|
|
| 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
|
|
| Is it possible to use a variable as the value for the other attributes: size or strength? | |
voxeoTonyT
|
|
| 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
|
|
| 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
|
|
| 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
|
|
| 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
|
|
| 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
|
|
| 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
|
|
| 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 |