发音为什么时有时无?

yzhenderson 2010-03-15 08:22:31
我编写的一个叫号程序,在叫号时时有时无,请帮我看看什么原因?
Timer1.Stop()
Dim MyVoice As New SpeechLib.SpVoice
Dim strData As String
Button1.Enabled = False
Button2.Enabled = False
If Trim(TextBox1.Text) <> "" Then
mciExecute("Play " & Application.StartupPath & "\1201.wav")
System.Threading.Thread.CurrentThread.Sleep(2000)
strData = StrConv(TextBox1.Text, VbStrConv.SimplifiedChinese, 2052)
MyVoice.Speak(strData)
End If
Button1.Enabled = True
Button2.Enabled = True
timer1.Start
...全文
84 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
tjficcbw 2010-03-15
  • 打赏
  • 举报
回复
我看这可能是一个定时器,操作的读声音的过程 
在读时设置一变量为1读完设置为0只有0时才可以读,这样不至于,读第二个时第一个没完,这样就断了
wuyq11 2010-03-15
  • 打赏
  • 举报
回复
Dim MyVoice As New SpeechLib.SpVoice
Dim tmpStr As String
tmpStr = ""
MyVoice.Voice = MyVoice.GetVoices([String].Empty, [String].Empty).Item(1)
MyVoice.Speak(tmpStr, SpeechVoiceSpeakFlags.SVSFlagsAsync)
检查数据
tjficcbw 2010-03-15
  • 打赏
  • 举报
回复
哦这样没法测试了
xingyuebuyu 2010-03-15
  • 打赏
  • 举报
回复
http://topic.csdn.net/u/20100310/11/3e7211f9-851a-448c-a07d-0d3b41b1413d.html
这个应该是只有英文的读出来了,中文的跳过了.
你的电脑是什么操作系统?VISTAT以上的系统才可以直接读中文的,XP系统要读中文是要装Microsoft Speech SDK 5.1 Language Pack.msi
tjficcbw 2010-03-15
  • 打赏
  • 举报
回复
Dim MyVoice As New SpeechLib.SpVoice
mciExecute("Play " & Application.StartupPath & "\1201.wav")?
这二个报错
tjficcbw 2010-03-15
  • 打赏
  • 举报
回复
这个报错,你引用了什么

16,553

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧