win7下调用语音包出现错误:error calling external object function speak at line 26 in clilck

lsypinghong 2016-12-09 01:50:45
win7下调用语音包出现错误:error calling external object function speak at line 26 in clilck of objet cb_3 of w_userlogin_2

代码:long ll_status
tts1 = CREATE OLEObject
ll_status=tts1.ConnectToNewObject("SAPI.SpVoice")
IF ll_status<0 then
messagebox('调用错误','您可能还未安装语音库!')
tts1.DisconnectObject()
DESTROY tts1
end if
//其中,Wf_ini为窗口函数
//取得当前安装的语音引擎和输出的音频设备
//注意,像VB等语言,数组下标以'0'开始
//返回1,正常;返回0,取得引擎失败;返回-1,取得音频设备失败(可能未安装声卡)
integer n,m
string ls_desp
//取得引擎列表
m = integer(tts1.GetVoices.Count)
if m < 1 then return 0
for n=1 to m
ls_desp = string(tts1.GetVoices.Item[n - 1].GetDescription())
if n=1 then ddlb_1.text = ls_desp
ddlb_1.additem(ls_desp)
next
// ddlb_1.visible=false
string ls_read
integer li_ret
li_ret=tts1.speak(" ","2")
//异步朗读
li_ret = tts1.speak(sItemNamens+' 信息是否正确',"1")
...全文
4006 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
lsypinghong 2017-02-14
  • 打赏
  • 举报
回复
打个语音补丁就可以了,ghost版本把他屏蔽了~~
qq_30798837 2016-12-30
  • 打赏
  • 举报
回复
请问楼主是怎么解决的呢?我的在win7 下也是报这个错误,但是在win10下正常的
lsypinghong 2016-12-11
  • 打赏
  • 举报
回复
已经解决,谢谢
lsypinghong 2016-12-10
  • 打赏
  • 举报
回复
自己顶一下吧

680

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder API 调用
社区管理员
  • API 调用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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