Jump to content

Speech Recognition in VB.Net

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
mohan

mohan

    Newbie

  • Members
  • Pip
  • 1 posts
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..

#2
ANG AfterShock

ANG AfterShock

    Newbie

  • Members
  • PipPip
  • 24 posts
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.