以下是引用明丰在2013-8-29 18:07:00的发言:
我的意思是:
显示“如果是同步朗读,”时→朗读;
显示“那么在朗读过程中,”时→朗读;
……
如下的代码便可实现,测试有效。
Dim d As String = CurrentTable.value
d = d.Replace(",",",|")
d = d.Replace(",",",|")
d = d.Replace(":",":|")
d = d.Replace(":",":|")
d = d.Replace("。","。|")
Dim Multi As String = d
Dim Values() As String
Values = Multi.split("|")
Dim sp As New DotNetSpeech.SpVoice()
sp.Voice = sp.GetVoices(String.Empty,String.Empty).Item(0)
for each val as string in values
e.Form.controls("TextBox1").text = val
application.doevents
sp.Speak(val, DotNetSpeech.SpeechVoiceSpeakFlags.SVSFDefault)
Next