Using SSML in Asterisk Dialplan
Posted: Tue Jun 05, 2007 12:47 pm
Cepstral's Swift application is actually quiet robust in nature. It accepts many SSML tags allowing you to modify the text which is to be spoken. For a complete list of SSML tags used by Swift visit: http://www.cepstral.com/cgi-bin/support ... &type=ssml.
With these SSML tags you can insert pauses, change the voice, adjust speech rate, adjust voice pitch, adjust output volume, add emphasis, insert recorded audio files, apply special effects, insert bookmarks, as well as spell words phonetically.
Note: by default the single and double quotes from Cepstral's web site have been switched as they will NOT work in Asterisk dialplan in Cepstral's default format. See the dailplan code snippet below for correct formating for Asterisk dialplan.
Quotes must be formated in this manner or Asterisk will fail at the first SSML tag it encounters.
With these SSML tags you can insert pauses, change the voice, adjust speech rate, adjust voice pitch, adjust output volume, add emphasis, insert recorded audio files, apply special effects, insert bookmarks, as well as spell words phonetically.
Note: by default the single and double quotes from Cepstral's web site have been switched as they will NOT work in Asterisk dialplan in Cepstral's default format. See the dailplan code snippet below for correct formating for Asterisk dialplan.
- Code: Select all
exten s,1,SWIFT('This is not <break strength="none" /> a pause.')
exten s,n,SWIFT('This is a <break strength="x-weak" /> phrase break.')
exten s,n,SWIFT('This is a <break strength="weak" /> phrase break.')
exten s,n,SWIFT('This is a <break strength="medium" /> sentence break.')
exten s,n,SWIFT('This is a <break strength="strong" /> paragraph break.')
exten s,n,SWIFT('This is a <break strength="x-strong" /> paragraph break.')
exten s,n,SWIFT('This is a <break time="3s" /> three second pause.')
exten s,n,SWIFT('This is a <break time="4500ms" /> 4.5 second pause.')
exten s,n,SWIFT('This is a <break /> sentence break.')
Quotes must be formated in this manner or Asterisk will fail at the first SSML tag it encounters.