Skip to content

Instantly share code, notes, and snippets.

@mandnyc
Created July 29, 2017 20:59
Show Gist options
  • Select an option

  • Save mandnyc/b58a502367783f6ace6bdf06c35531b5 to your computer and use it in GitHub Desktop.

Select an option

Save mandnyc/b58a502367783f6ace6bdf06c35531b5 to your computer and use it in GitHub Desktop.
var Speech = require("ssml-builder");
var speech = new Speech();
speech.say("it's a")
.prosody({volume: "-5dB", pitch:"low", rate: "50%"}, "chilly")
.prosody({volume: "-5dB", pitch: "high", rate: "80%"}, " 54 degrees outside")
.sentence("So Mandy, dress ")
.prosody({volume: "+5dB", pitch: "medium",rate: "80%"}, "warm ")
.prosody({volume: "+10dB", pitch: "high", rate: "60%"}, " and don't ")
.say("forget to bring ")
.prosody({volume: "+20dB", pitch:"medium", rate: "80%"}, "an umbrella")
.pause("100ms")
.say("since it's raining");
var ssml = speech.ssml();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment