Speech recognition in vb6
Anyone know how to code speech recognition that Microsoft speech recognition will detect set word.... any references i have put all the code which can make recognition but do know how to code Microsoft speech recognition will detect set word....
My coding:
Option Explicit
Dim rs As New ADODB.Recordset
Dim recognizer As SpInprocRecognizer
Dim MyGrammer As ISpeechRecoGrammar
Dim grammar As ISpeechRecoGrammar
Dim InputFile As SpeechLib.SpFileStream
Private Sub Form_Load()
Set RC = New SpInProcRecoContext
Set recognizer = RC.recognizer
Set myGrammar = RC.CreateGrammar
myGrammar.DictationSetState SGDSActive
Dim Category As SpObjectTokenCategory
Set Category = New SpObjectTokenCategory
Category.SetId SpeechCategoryAudioIn
Dim Token As SpObjectToken
Set Token = New SpObjectToken
Token.SetId Category.Default()
Set recognizer.AudioInput = Token
Out 888, 0
E开发者_运维知识库nd Sub
Before, SSR M.S. and releated company make TTS - Text-To-Speech, basic engine for TTS is foenemmology - phonemes for speak P.C. to louds and phonemes for speech recognition over mcirophone. How like P.C. speak words it except of human to say words to microphone, but a lot of words have same speak and different write in the sentence. In the other hand, SSR engine except tempo, pronuanciation-(For example: Clear-north-american-low-accented speak english language (not loud, just clear speak) ), middle-average of power of your speak words in the microphone against of out of louds and some time for training SSR engine for collect information about that in own data-system. SSR use work of TTS and of own engine for specific language to produce speech recognition.
Your answer is on this web page http://www.martin2k.co.uk/vb6/tips/vb_10.php
Just to be clear, there are two types of speech recognition, dictation and command and control. In dictation mode, you are listening for every word possible and trying to find a match. This is good for dictation type systems where a person is speaking and you wish to transcribe everything. A good example of dictation grammar is converting a voicemail to text. Command and control uses a limited grammar which increases accuracy. If by "set word" you mean a set number of words, then command and control is what you want. An example would be an IVR system where you play a prompt and wait for a response, "Please press 1 for sales and 2 for support". The grammar would only contain "1 or 2". The word one might sound like a lot of different words if we were searching through the entire language dictionary, but comparing the difference between only the words 1 and 2 is easy. Here is one sample to help anyone learning about speech recognition:
http://msdn.microsoft.com/en-us/library/ms720589(v=vs.85).aspx
You can see how to load a grammar from a file and how to structure an XML file that holds your grammar.
精彩评论