我发现,如果在PC上禁用了声音驱动程序,则不会调用BookmarkReached事件。有趣的是,却调用了SpeakCompleted事件。好像是Windows Bug。我知道如果禁用了声音驱动程序,您将不会听到语音,但是在某些语音书签期间会发生某些动作,因此无法正常工作。也许我的选择是检测到没有声音驱动程序并提示,但这是我的最后选择。有任何想法吗?
synth.SpeakAsync(builder);
eventHandlerSpeechCompleted = new EventHandler<SpeakCompletedEventArgs>(synth_SpeakCompleted);
eventHandlerBookmarkReached = new EventHandler<BookmarkReachedEventArgs>(synth_BookmarkReached);
synth.BookmarkReached += eventHandlerBookmarkReached;
synth.SpeakCompleted += eventHandlerSpeechCompleted;
this.speechCompletedAction = speechCompletedAction;