45 references to TtsEventId
System.Speech (45)
Internal\Synthesis\EngineSite.cs (9)
55if (sapiEvent.EventId == (short)TtsEventId.EndInputStream && _eventMapper != null) 284switch ((TtsEventId)sapiEvent.EventId) 286case TtsEventId.Phoneme: 293case TtsEventId.Bookmark: 296ttsEvent = new TTSEvent((TtsEventId)sapiEvent.EventId, _prompt!, null, null, _audio!.Duration, _audio.Position, bookmark, (uint)sapiEvent.Param1, sapiEvent.Param2); 299ttsEvent = new TTSEvent((TtsEventId)sapiEvent.EventId, _prompt!, null, null, _audio!.Duration, _audio.Position, null, (uint)sapiEvent.Param1, sapiEvent.Param2); 390else if (evt.Id == TtsEventId.Phoneme) 498if (evt.Id == TtsEventId.Phoneme) 504if (firstEvent.Id == TtsEventId.Phoneme)
Internal\Synthesis\TTSEvent.cs (5)
14internal TTSEvent(TtsEventId id, Prompt prompt, Exception? exception, VoiceInfo? voice) 22internal TTSEvent(TtsEventId id, Prompt prompt, Exception? exception, VoiceInfo? voice, TimeSpan audioPosition, long streamPosition, string? bookmark, uint wParam, IntPtr lParam) 35TTSEvent ttsEvent = new(id: TtsEventId.Phoneme, prompt, exception: null, voice: null, audioPosition, streamPosition: default, bookmark: null, wParam: default, default); 48internal TtsEventId Id 152private TtsEventId _evtId;
Internal\Synthesis\VoiceSynthesis.cs (21)
301internal void AddEvent<T>(TtsEventId ttsEvent, ref EventHandler<T>? internalEventHandler, EventHandler<T> eventHandler) where T : PromptEventArgs 320internal void RemoveEvent<T>(TtsEventId ttsEvent, ref EventHandler<T>? internalEventHandler, EventHandler<T> eventHandler) where T : EventArgs 746InjectEvent(TtsEventId.StartInputStream, paramSpeak._prompt, paramSpeak._prompt.Exception, null); 865InjectEvent(TtsEventId.VoiceChange, prompt, null, currentVoiceId); 899if ((_ttsInterest & (1 << (int)TtsEventId.Phoneme)) != 0 && engineProxy.EngineAlphabet != AlphabetType.Ipa) 965private void InjectEvent(TtsEventId evtId, Prompt prompt, Exception? exception, VoiceInfo? voiceInfo) 968if (evtId == TtsEventId.EndInputStream) 1024InjectEvent(TtsEventId.EndInputStream, prompt, exception, null); 1033InjectEvent(TtsEventId.EndInputStream, prompt, exception, null); 1040InjectEvent(TtsEventId.EndInputStream, prompt, exception, null); 1523TtsEventId eventId = ttsEvent.Id; 1527case TtsEventId.StartInputStream: 1532case TtsEventId.EndInputStream: 1537case TtsEventId.SentenceBoundary: 1540case TtsEventId.WordBoundary: 1545case TtsEventId.Bookmark: 1550case TtsEventId.VoiceChange: 1555case TtsEventId.Phoneme: 1566case TtsEventId.Viseme: 1809private int _ttsEvents = (1 << (int)TtsEventId.StartInputStream) | (1 << (int)TtsEventId.EndInputStream);
Synthesis\SpeechSynthesizer.cs (10)
308VoiceSynthesizer.AddEvent<SpeakProgressEventArgs>(TtsEventId.WordBoundary, ref VoiceSynthesizer._speakProgress, value); 314VoiceSynthesizer.RemoveEvent<SpeakProgressEventArgs>(TtsEventId.WordBoundary, ref VoiceSynthesizer._speakProgress, value); 323VoiceSynthesizer.AddEvent<BookmarkReachedEventArgs>(TtsEventId.Bookmark, ref VoiceSynthesizer._bookmarkReached, value); 329VoiceSynthesizer.RemoveEvent<BookmarkReachedEventArgs>(TtsEventId.Bookmark, ref VoiceSynthesizer._bookmarkReached, value); 338VoiceSynthesizer.AddEvent<VoiceChangeEventArgs>(TtsEventId.VoiceChange, ref VoiceSynthesizer._voiceChange, value); 344VoiceSynthesizer.RemoveEvent<VoiceChangeEventArgs>(TtsEventId.VoiceChange, ref VoiceSynthesizer._voiceChange, value); 355VoiceSynthesizer.AddEvent<PhonemeReachedEventArgs>(TtsEventId.Phoneme, ref VoiceSynthesizer._phonemeReached, value); 361VoiceSynthesizer.RemoveEvent<PhonemeReachedEventArgs>(TtsEventId.Phoneme, ref VoiceSynthesizer._phonemeReached, value); 370VoiceSynthesizer.AddEvent<VisemeReachedEventArgs>(TtsEventId.Viseme, ref VoiceSynthesizer._visemeReached, value); 376VoiceSynthesizer.RemoveEvent<VisemeReachedEventArgs>(TtsEventId.Viseme, ref VoiceSynthesizer._visemeReached, value);