public void Ssml_Prosody_generates_prosody() { const string expected = @"<prosody rate=""150%"" pitch=""x-low"" volume=""-5dB"">Hello World</prosody>"; var actual = new Prosody { Rate = ProsodyRate.Percent(150), Pitch = ProsodyPitch.ExtraLow, Volume = ProsodyVolume.Decibel(-5) }; actual.Elements.Add(new PlainText("Hello World")); CompareXml(expected, actual); }
public SsmlBuilder Rate(ProsodyRate rate) { textToSpeak.AppendLine(GetProsodyStart("rate", rate.ToString())); stack.Push("</prosody>"); return(this); }
public SsmlBuilder Rate(string text, ProsodyRate rate) { textToSpeak.AppendLine(Prosody("rate", rate.ToString(), text)); return(this); }