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>"); }
public ProsodyWriter(ISpeechWriter writer, SpeechPitch pitch) { _writer = writer; _pitch = pitch; }
public ISpeech WithPitch(SpeechPitch pitch) { _writer = new ProsodyWriter(_writer, pitch); return(this); }