VB+语音识别软件
来源:互联网 发布:诺基亚6120软件下载 编辑:程序博客网 时间:2024/03/29 22:43
这个程序叫Dictation源码如下:Option ExplicitDim WithEvents RecoContext As SpSharedRecoContextDim Grammar As ISpeechRecoGrammarDim m_bRecoRunning As BooleanDim m_cChars As IntegerPrivate Sub Form_Load() SetState False m_cChars = 0End SubPrivate Sub command1_Click() Debug.Assert Not m_bRecoRunning If (RecoContext Is Nothing) Then Debug.Print "Initializing SAPI reco context object..." Set RecoContext = New SpSharedRecoContext Set Grammar = RecoContext.CreateGrammar(1) Grammar.DictationLoad End If Grammar.DictationSetState SGDSActive SetState TrueEnd SubPrivate Sub command2_Click() Debug.Assert m_bRecoRunning Grammar.DictationSetState SGDSInactive SetState FalseEnd SubPrivate Sub RecoContext_Recognition(ByVal StreamNumber As Long, _ ByVal StreamPosition As Variant, _ ByVal RecognitionType As SpeechRecognitionType, _ ByVal Result As ISpeechRecoResult _ ) Dim strText As String strText = Result.PhraseInfo.GetText Debug.Print "Recognition: " & strText & ", " & _ StreamNumber & ", " & StreamPosition text1.SelStart = m_cChars text1.SelText = strText & " " m_cChars = m_cChars + 1 + Len(strText)End SubPrivate Sub SetState(ByVal bNewState As Boolean) m_bRecoRunning = bNewState btnStart.Enabled = Not m_bRecoRunning btnStop.Enabled = m_bRecoRunningEnd Sub commmand1的作用是初始化文本框的内容和启动语音设备(系统自带 语速你可利用speed属性自己调整) command2的作用是暂停语音设备 文本框的名字为text1 就说这么多
0 0
- VB+语音识别软件
- VB图像识别、语音识别源代码+注释
- 开源语音识别软件
- 开源语音识别软件
- 网上找到的VB语音识别程序
- 语音朗读-语音识别-语音控制软件源码
- IBM公司公布语音识别软件源代码
- Openears - 语音识别软件适用于iOS
- 2.5音频编辑软件&2.6语音识别技术
- 语音识别之语音库采集软件---web服务器搭建
- 语音识别
- 语音识别
- 语音识别
- 语音识别
- 语音识别
- 语音识别
- 语音识别
- 语音识别
- Raspberry Pi 更新软件源
- 贪吃蛇小游戏2d
- 位操作训练
- 作业感悟
- Java基础学习总结(10)—— Cookie/Session机制详解
- VB+语音识别软件
- Spark算子使用示例
- 线程之“生产者消费者”
- 关于PT/DC 中查看固定值的方法
- 单链表的逆转
- 树链剖分_MODLE
- 分治算法
- 位操作训练
- 保留位置