Microsoft Speech SDK5.1和Language Pack我已经下载安装了,我的程序很简单,就是点击"朗读"按钮,开始朗读Text框中的文本,只用调用vtextauto.speak(text),但是只能朗读英文,无法朗读中文,请大家指出这是怎么回事,并给出源代码. 万分感谢!
Option ExplicitDim sph As SpVoice Private Sub Command1_Click() sph.Speak Text1.TextEnd SubPrivate Sub Form_Load() Dim t As SpObjectToken Set sph = New SpVoice For Each t In sph.GetVoices Me.List1.AddItem t.GetDescription Next Set sph.Voice = sph.GetVoices.Item(1)End SubPrivate Sub Form_Unload(Cancel As Integer) Set sph = Nothing End SubPrivate Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Command1_Click
http://soft.mumayi.net/downinfo/2520.html朗读的代码可以参考:
http://www.codechina.net/resource/html/2006-01/16/131960.html
万分感谢!
Private Sub Command1_Click()
sph.Speak Text1.TextEnd SubPrivate Sub Form_Load()
Dim t As SpObjectToken
Set sph = New SpVoice
For Each t In sph.GetVoices
Me.List1.AddItem t.GetDescription
Next
Set sph.Voice = sph.GetVoices.Item(1)End SubPrivate Sub Form_Unload(Cancel As Integer)
Set sph = Nothing
End SubPrivate Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Command1_Click
End Sub