Mr/Sir..
I am developing a speech recognition in vb.net. How to code when user say something, eg: "CAT", system will reply "CORRECT" by speech (speech-to-speech) recognition. Below are the code i found.. bt it do not work.. no error meesage.. no output. and i dont think this is the right code for my ques.
Private Sub recognizer_SpeechRecognized(ByVal sender As Object, ByVal e As SpeechRecognizedEventArgs)
Dim objSpeechToSpeech As Object
objSpeechToSpeech = CreateObject("SAPI.spvoice")
Select Case e.Result.Text
Case "CAT"
objSpeechToSpeech.Speak("correct")
End Select
End Sub
As u can notice in the code.. "Select Case e.Result.Text". Im not using any text in my system because im developing learning system for blind people which is a speech-to-speech communication.
Any help.. if can post sugested code.. thank you..
Speech Recognition in VB.Net
Started by mohan, Dec 15 2010 10:13 AM
1 reply to this topic
#1
Posted 15 December 2010 - 10:13 AM
|
|
|
#2
Posted 16 December 2010 - 03:25 PM
Try declaring the object variable thing above all of the code. Like so...
Dim objSpeechToSpeech As Object
objSpeechToSpeech = CreateObject("SAPI.spvoice")
Public class
Private Sub recognizer_SpeechRecognized(ByVal sender As Object, ByVal e As SpeechRecognizedEventArgs)
Select Case e.Result.Text
Case "CAT"
objSpeechToSpeech.Speak("correct")
End Select
End Sub
also, post a little more about your object your using and your problem.
Dim objSpeechToSpeech As Object
objSpeechToSpeech = CreateObject("SAPI.spvoice")
Public class
Private Sub recognizer_SpeechRecognized(ByVal sender As Object, ByVal e As SpeechRecognizedEventArgs)
Select Case e.Result.Text
Case "CAT"
objSpeechToSpeech.Speak("correct")
End Select
End Sub
also, post a little more about your object your using and your problem.


Sign In
Create Account

Back to top









