数学建模中的排班问题:VB编程(如何调用金山词霸的单词和汉字的读音)

来源:百度文库 编辑:高校问答 时间:2024/04/28 01:37:59
在VB里如何调用金山词霸的单词和汉字的读音,请写出源程序,只要能实现,我将追加200分!!
我并不想编一个词霸,我只是想在没有运行金山词霸的情况下调用金山词霸的读音!!!
我现在正在为我儿子编一个背单词的程序,每个单词都要进行录音,太辛苦了!!
我不想用微软的TTS发音,这种机器合成的声音太不自然了

不错

Option Explicit
'Create a VB6 EXE project, and drag a command button on the form,
'then add the reference:
' KSVoice 1.0 Type Library
Private Const KWord As String = "play"

'Run the program and click the command button, listen~
Private Sub Command1_Click()
Dim ksv As KSVOICELib.KDVoice
Set ksv = New KSVOICELib.KDVoice
ksv.InitSoundEngine
Call ksv.PlaySound(KWord)
End Sub

两个进程之间的通信十分复杂,并且两个进程所对应的程序的源代码都是你自己写的才能通信。

如果你的VB功底好,自己编一个mini词霸并非难事。

很简单的,我来教你,加我QQ406400171

KingSoft提供了库播放某个单词的读音,比如我用VB6试过了,可以这样调用:

Option Explicit
'Create a VB6 EXE project, and drag a command button on the form,
'then add the reference:
' KSVoice 1.0 Type Library
Private Const KWord As String = "play"

'Run the program and click the command button, listen~
Private Sub Command1_Click()
Dim ksv As KSVOICELib.KDVoice
Set ksv = New KSVOICELib.KDVoice
ksv.InitSoundEngine
Call ksv.PlaySound(KWord)
End Sub

其实可以不要通过金山词霸
金山词霸也是通过微软的TTS引擎来实现的
到网上去搜索一下有关VB中调用TTS的文章吧

在开始菜单的运行里输入 :narrator
回车看看