本文介绍了如何知道SpeakTextAsync何时完成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
怎么知道SpeakTextAsync什么时候完成?我有一个应用程序,它会说一些文本,然后需要提示回复。我怎么知道SpeechSynthesizer何时完成?
-matt
解决方案
如果您使用 等待运算符,则在语音完成后才会返回。
await synthesizer.SpeakTextAsync(" speech text"); //演讲结束
Hi Everyone,
how does one know when SpeakTextAsync is done? I have an app where it speaks some text, then need to prompt for a response. How do I know when the the SpeechSynthesizer has completed?
-matt
解决方案If you use theawaitoperator, it doesn't return until after the speech is completed.
await synthesizer.SpeakTextAsync("speech text"); // speech is completed
更多推荐
如何知道SpeakTextAsync何时完成?
发布评论