Skip to content

Instantly share code, notes, and snippets.

@KitWallace
Created August 17, 2012 17:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KitWallace/3380780 to your computer and use it in GitHub Desktop.
Save KitWallace/3380780 to your computer and use it in GitHub Desktop.
ssml functions
def escape_XML(str) :
str.replace('"',"\042")
str.replace('&',"\046")
str.replace("'","\047")
str.replace('<',"\074")
str.replace('>',"\076")
return str
def ssml_break(msec):
return '<break time="'+str(msec)+'"msec/>'
def ssml_digits(digits):
return '<say-as interpret-as="tts:digits">'+str(digits)+"</say-as>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment