コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: SsmlBuilder.cs プロジェクト: dotupNET/AlexaNet
 public SsmlBuilder Volume(ProsodyVolume volume)
 {
     textToSpeak.AppendLine(GetProsodyStart("volume", volume.ToString()));
     stack.Push("</prosody>");
     return(this);
 }
コード例 #3
0
ファイル: SsmlBuilder.cs プロジェクト: dotupNET/AlexaNet
 public SsmlBuilder WithVolume(string text, ProsodyVolume volume)
 {
     textToSpeak.AppendLine(Prosody("volume", volume.ToString(), text));
     return(this);
 }
コード例 #4
0
 public AlexaSpeak Volume(string text, ProsodyVolume volume)
 {
     textToSpeak.AppendLine(Prosody("volume", volume.ToString(), text));
     return(this);
 }