Using SSML in Asterisk Dialplan

Integrating the Cepstral engine

Using SSML in Asterisk Dialplan

Postby Justin » 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.

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.
---------------------------------
Justin Leoni
Custom Developer
Digium
Justin
 
Posts: 6
Joined: Tue Jun 05, 2007 12:23 pm
Location: Huntsville, AL

Cannot get louder command to work in dial plan

Postby dghundt » Thu Oct 22, 2009 7:10 pm

Using asterisk 1.4 and swift.
The example above does not work.
If I place
Code: Select all
exten => talk,4,Swift('This is a <break strength="medium" /> sentence break.')

in my dialplan, I only hear "This is a".

I can't seem to get the louder ssml to work either. I hear nothing.
I keep trying various combinations of the following using single quotes, double quotes.

Code: Select all
exten => talk,4,Swift('<prosody volume="x-loud">${name}</prosody>')


Anyone have a working example using the volume command? thank you!
dghundt
 
Posts: 1
Joined: Thu Oct 22, 2009 7:07 pm


Return to Asterisk

Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron