Estou tentando usar a speech para reconhecimento de voz algum tempo já e gostaria de saber o porque esta dando este erro como posso consertar ele obrigado desde já...
aqui esta codigo que estou usando estou tentando um de exemplo que vi pela net
Imports System.Speech
Imports System.Speech.Synthesis
Imports System.Speech.Recognition
Imports System.Threading
Imports System.Globalization
Imports System.IO
Public Class Form1
Public WithEvents recognizer As New System.Speech.Recognition.SpeechRecognitionEngine
Dim gram As New System.Speech.Recognition.DictationGrammar()
Public synth As New System.Speech.Synthesis.SpeechSynthesizer
Dim cmd As Object
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
recognizer.LoadGrammar(gram)
recognizer.SetInputToDefaultAudioDevice()
recognizer.RecognizeAsync()
End Sub
Private Sub GotSpeech(ByVal sender As System.Object, ByVal phrase As System.Speech.Recognition.SpeechRecognizedEventArgs) Handles recognizer.SpeechRecognized
If InStr(cmd, "run") Or InStr(cmd, "Run") Then
If cmd.Split(" ")(1) = "Notepad" Or cmd.Split(" ")(1) = "notepad" Then
synth.Speak("Running Notepad.")
Shell("notepad.exe", AppWinStyle.NormalFocus, False)
End If
End If
End Sub
End Class