Skip to content

FreeSWITCH "say" mappings to SSML elements

polysics edited this page Oct 10, 2012 · 3 revisions

FreeSWITCH and say

Initial support for FreeSWITCH only allowed for audio files to be played. The say application provides many other formats, some of which could be supported in the multi-format methods that Adhearsion exposes, to allow TTS-like output similar to what is done on Asterisk with SayDigits and SayUnixTime. The goal of this document is to outline mappings between SSML generated by Adhearsion and the say application. Reference document: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_say

Sound files

The sound files are not installed by default and are needed for say to work. More information at: http://wiki.freeswitch.org/wiki/Installation_Guide#Compile_and_Install_Sounds

Date and time

Adhearsion generates an SSML block with an interpret-as value of either "date" or "time", and a format value that contains a hint on how to render audio, as per SSML specs. FreeSWITCH supports those through the use of CURRENT_DATE, CURRENT_TIME and CURRENT_DATE_TIME apps. They only take a Unix timestamp as parameter, with no formatting options.

Numeric

FreeSWITCH supports cardinal (forty-two), ordinal (forty-first) and single digit (four-on) output. The modifiers used are "pronounced", "counted" and "iterated"

Examples

say en number pronounced 12345
say en CURRENT_DATE_TIME pronounced 1339365900