语音播报
Posted 6b23
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了语音播报相关的知识,希望对你有一定的参考价值。
public delegate void SpeechDelegate(string strGNo, string strNumber); private void SpeechNumber(string strGNo, string strNumber) { try { if (this.InvokeRequired) { this.BeginInvoke(new SpeechDelegate(this.SpeechNumber), strGNo, strNumber); } else { SpeechVoiceSpeakFlags SpFlags = SpeechVoiceSpeakFlags.SVSFlagsAsync; SpVoice Voice = new SpVoice(); Voice.Voice = Voice.GetVoices().Item(0); Voice.Rate = 0; int i = Voice.Speak("请" + strNumber + "号" + strPatientName + "到" + strGNo + "号窗口", SpFlags); } } catch (Exception ex) { LogCommon.WriteLog(ex.Source.ToString() + "-" + ex.TargetSite.Name + "-" + ex.Message); throw ex; } }
以上是关于语音播报的主要内容,如果未能解决你的问题,请参考以下文章
Android studio 百度地图开发(10)语音播报的问题:能正常导航,但是无法语音播报