Пример #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);
 }