Пример #1
0
        private void AddNewSeg(TTSVoice pCurrVoice, AudioData audio)
        {
            SpeechSeg speechSeg = new SpeechSeg(pCurrVoice, audio);

            _listSeg.Add(speechSeg);
            _lastSeg = speechSeg;
        }
Пример #2
0
        private void AddNewSeg(TTSVoice pCurrVoice, AudioData audio)
        {
            SpeechSeg pNew = new(pCurrVoice, audio);

            _listSeg.Add(pNew);
            _lastSeg = pNew;
        }
Пример #3
0
 internal void AddText(TTSVoice ttsVoice, TextFragment textFragment)
 {
     if (_fNotInTextSeg || ttsVoice != _ttsVoice)
     {
         AddNewSeg(ttsVoice, null);
         _fNotInTextSeg = false;
     }
     _lastSeg.AddFrag(textFragment);
 }
Пример #4
0
        internal void SetVoice(string name, CultureInfo culture, VoiceGender gender, VoiceAge age, int variant)
        {
            TTSVoice ttsVoice = _voiceSynthesis.GetEngine(name, culture, gender, age, variant, false);

            if (!ttsVoice.Equals(_ttsVoice))
            {
                _ttsVoice      = ttsVoice;
                _fNotInTextSeg = true;
            }
        }
Пример #5
0
        public override bool Equals(object obj)
        {
            TTSVoice tTSVoice = obj as TTSVoice;

            if (tTSVoice != null)
            {
                return(_voiceId.Equals(tTSVoice.VoiceInfo));
            }
            return(false);
        }
Пример #6
0
 internal SpeechSeg(TTSVoice voice, AudioData audio)
 {
     _voice = voice;
     _audio = audio;
 }
Пример #7
0
 /// <param name="voiceSynthesis">Voice synthesizer used</param>
 /// <param name="ttsVoice">Default engine to use</param>
 internal SpeakInfo(VoiceSynthesis voiceSynthesis, TTSVoice ttsVoice)
 {
     _voiceSynthesis = voiceSynthesis;
     _ttsVoice       = ttsVoice;
 }
Пример #8
0
        /// <summary>
        /// Tests whether two objects are equivalent
        /// </summary>
        public override bool Equals(object obj)
        {
            TTSVoice voice = obj as TTSVoice;

            return(voice != null && (_voiceId.Equals(voice.VoiceInfo)));
        }