예제 #1
0
 public ProsodyWriter(ISpeechWriter writer, double?rate = null, double?pitch = null, double?volume = null)
 {
     _writer            = writer;
     _rateInPercentage  = rate;
     _pitchInPercentage = pitch;
     _volumeInDecibels  = volume;
 }
예제 #2
0
        public void Write(XmlWriter writer)
        {
            writer.WriteStartDocument();
            writer.WriteStartElement("speak");

            for (var index = 0; index < _says.Count; index++)
            {
                ISpeechWriter say = _says[index];
                say.Write(writer);
                if (index != _says.Count - 1)
                {
                    writer.WriteString(" ");
                }
            }

            writer.WriteEndElement();
            writer.WriteEndDocument();
        }
예제 #3
0
 public SayWriter(ISpeech speech, string value) : base(speech)
 {
     _value  = value;
     _writer = new PlainTextWriter(value);
 }
예제 #4
0
 public ISpeech WithPitch(SpeechPitch pitch)
 {
     _writer = new ProsodyWriter(_writer, pitch);
     return(this);
 }
예제 #5
0
 public ISpeech AsTelephone()
 {
     _writer = new SayAsWriter("telephone", _value);
     return(this);
 }
예제 #6
0
 public ISpeech WithVolume(SpeechVolume volume)
 {
     _writer = new ProsodyWriter(_writer, volume);
     return(this);
 }
예제 #7
0
 public EmphasiseWriter(ISpeechWriter writer, EmphasiseLevel level)
 {
     _writer = writer;
     _level  = level;
 }
예제 #8
0
 public ProsodyWriter(ISpeechWriter writer, SpeechRate rate)
 {
     _writer = writer;
     _rate   = rate;
 }
예제 #9
0
 public ProsodyWriter(ISpeechWriter writer, SpeechVolume volume)
 {
     _writer = writer;
     _volume = volume;
 }
예제 #10
0
 public ISpeech AsAlias(string alias)
 {
     _writer = new SubWriter(_writer, alias);
     return(this);
 }
예제 #11
0
 public ISpeech AsFraction()
 {
     _writer = new SayAsWriter("fraction", _value);
     return(this);
 }
예제 #12
0
 public ISpeech AsPhoneme(PhoneticAlphabet alphabet, string phoneticPronunciation)
 {
     _writer = new PhonemeWriter(_writer, alphabet, phoneticPronunciation);
     return(this);
 }
예제 #13
0
 public ISpeech AsSentence()
 {
     _writer = new TagWriter(_writer, "s");
     return(this);
 }
예제 #14
0
 public ISpeech AsParagraph()
 {
     _writer = new TagWriter(_writer, "p");
     return(this);
 }
예제 #15
0
 public ISpeech Emphasise(EmphasiseLevel level)
 {
     _writer = new EmphasiseWriter(_writer, level);
     return(this);
 }
예제 #16
0
 public ISpeech WithVolume(double decibels)
 {
     _writer = new ProsodyWriter(_writer, volume: decibels);
     return(this);
 }
예제 #17
0
 public ISpeech AsCharacters()
 {
     _writer = new SayAsWriter("characters", _value);
     return(this);
 }
예제 #18
0
 public ISpeech AsUnit()
 {
     _writer = new SayAsWriter("unit", _value);
     return(this);
 }
예제 #19
0
 public ISpeech SpellOut()
 {
     _writer = new SayAsWriter("spell-out", _value);
     return(this);
 }
예제 #20
0
 public PronounceWriter(ISpeechWriter writer, PronounceRole role)
 {
     _writer = writer;
     _role   = role;
 }
예제 #21
0
 public ProsodyWriter(ISpeechWriter writer, SpeechPitch pitch)
 {
     _writer = writer;
     _pitch  = pitch;
 }
예제 #22
0
 public TagWriter(ISpeechWriter writer, string tag)
 {
     _writer = writer;
     _tag    = tag;
 }
예제 #23
0
 public ISpeech AsAddress()
 {
     _writer = new SayAsWriter("address", _value);
     return(this);
 }
예제 #24
0
 public ISpeech WithPitch(double percentage)
 {
     _writer = new ProsodyWriter(_writer, pitch: percentage);
     return(this);
 }
예제 #25
0
 public SubWriter(ISpeechWriter writer, string alias)
 {
     _writer = writer;
     _alias  = alias;
 }
예제 #26
0
 public ISpeech AsInterjection()
 {
     _writer = new SayAsWriter("interjection", _value);
     return(this);
 }
예제 #27
0
 public PhonemeWriter(ISpeechWriter writer, PhoneticAlphabet alphabet, string phoneticPronunciation)
 {
     _writer   = writer;
     _alphabet = alphabet;
     _phoneticPronunciation = phoneticPronunciation;
 }
예제 #28
0
 public ISpeech Expletive()
 {
     _writer = new SayAsWriter("expletive", _value);
     return(this);
 }
예제 #29
0
 public ISpeech AsTime()
 {
     _writer = new SayAsWriter("time", _value);
     return(this);
 }
예제 #30
0
 public ISpeech WithRate(double percentage)
 {
     _writer = new ProsodyWriter(_writer, rate: percentage);
     return(this);
 }