Esempio n. 1
0
        public void ShouldSetTheSpeechPitchOnPredefinedValue(SpeechPitch pitch, string expected)
        {
            string speech = new Speech()
                            .Say("I can speak with my normal pitch,")
                            .Say("but also with a different pitch")
                            .WithPitch(pitch)
                            .Say(".")
                            .Build();

            speech.Should().Be($"<speak>I can speak with my normal pitch, <prosody pitch=\"{expected}\">but also with a different pitch</prosody>.</speak>");
        }
Esempio n. 2
0
 public ProsodyWriter(ISpeechWriter writer, SpeechPitch pitch)
 {
     _writer = writer;
     _pitch  = pitch;
 }
Esempio n. 3
0
 public ISpeech WithPitch(SpeechPitch pitch)
 {
     _writer = new ProsodyWriter(_writer, pitch);
     return(this);
 }