以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  语音朗读长文本,经常中断了,是几个意思?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=95292)

--  作者:MarkHong
--  发布时间:2017/1/15 23:44:00
--  语音朗读长文本,经常中断了,是几个意思?
Dim sp As New DotNetSpeech.SpVoice()
Dim txt As String = e.Form.Controls("Text").text
sp.Voice = sp.GetVoices(String.Empty,String.Empty).Item(0)
sp.rate = 0
sp.Speak(txt, DotNetSpeech.SpeechVoiceSpeakFlags.SVSFlagsAsync)

文本中有空格,标点,段落

每次测试中断的地方都还不一样,反正从来没顺利读完过

--  作者:MarkHong
--  发布时间:2017/1/15 23:59:00
--  
已解决,sp放全局