private void AddNewSeg(TTSVoice pCurrVoice, AudioData audio) { SpeechSeg speechSeg = new SpeechSeg(pCurrVoice, audio); _listSeg.Add(speechSeg); _lastSeg = speechSeg; }
private void AddNewSeg(TTSVoice pCurrVoice, AudioData audio) { SpeechSeg pNew = new(pCurrVoice, audio); _listSeg.Add(pNew); _lastSeg = pNew; }
internal void AddText(TTSVoice ttsVoice, TextFragment textFragment) { if (_fNotInTextSeg || ttsVoice != _ttsVoice) { AddNewSeg(ttsVoice, null); _fNotInTextSeg = false; } _lastSeg.AddFrag(textFragment); }
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; } }
public override bool Equals(object obj) { TTSVoice tTSVoice = obj as TTSVoice; if (tTSVoice != null) { return(_voiceId.Equals(tTSVoice.VoiceInfo)); } return(false); }
internal SpeechSeg(TTSVoice voice, AudioData audio) { _voice = voice; _audio = audio; }
/// <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; }
/// <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))); }