dotproduct
2010-02-11 19:50:01 UTC
Hi,
I am working on an application (Written is C++ using SAPI 5.4 Windows SDK
6.1) that trains the speech recognition engine with the use a wav file along
with a text file that contains the transcript of what is said in the wav file.
I have implemented the following (psuedo code):
ISpRecognizer2 is instantiated and I retreive the RecoContext.
I set the context to retain andy audio.
The wav file is opened and bound to a ISpStream object.
A Grammar is created using the words in the text that I mentioned above.
The input on the recognizer is set to the stream that is bound to the wav
file.
The recognizers training state is set with both parameters set to TRUE,TRUE
I await the results from the recognizer and it returns with a successful
recognition of the entire phrase from the wav file.
I get the current profile objectToken and call GetStorageFileName (or create
it if it already exists) and then bind a new ISpStream object to it.
I then retreive the result object from the recognition and get the audio
that was retained during recognition.
I then write the recognized audio to the stream that is bound to the Storage
file and copy the bytes from the recognized audio to it.
I QueryInterface the ISpTranscript object from that stream and append the
text to it.
Finally I set the training state to FALSE,TRUE which should fire the entire
training process to read the registry values that were written above when I
called GetStorageFileName and then retreive the training audio written to
where the file was placed.
But.......Nothing....hmph! The engine still does not successfully transcribe
my voice.
Can anyone with any experience with what I am trying to do, explain where I
am going wrong? Or where I should look to find out what the problem is?
I am not getting any errors and I can find all the registry values with the
file placed in the folder that is written in the registry as well.
I am working on an application (Written is C++ using SAPI 5.4 Windows SDK
6.1) that trains the speech recognition engine with the use a wav file along
with a text file that contains the transcript of what is said in the wav file.
I have implemented the following (psuedo code):
ISpRecognizer2 is instantiated and I retreive the RecoContext.
I set the context to retain andy audio.
The wav file is opened and bound to a ISpStream object.
A Grammar is created using the words in the text that I mentioned above.
The input on the recognizer is set to the stream that is bound to the wav
file.
The recognizers training state is set with both parameters set to TRUE,TRUE
I await the results from the recognizer and it returns with a successful
recognition of the entire phrase from the wav file.
I get the current profile objectToken and call GetStorageFileName (or create
it if it already exists) and then bind a new ISpStream object to it.
I then retreive the result object from the recognition and get the audio
that was retained during recognition.
I then write the recognized audio to the stream that is bound to the Storage
file and copy the bytes from the recognized audio to it.
I QueryInterface the ISpTranscript object from that stream and append the
text to it.
Finally I set the training state to FALSE,TRUE which should fire the entire
training process to read the registry values that were written above when I
called GetStorageFileName and then retreive the training audio written to
where the file was placed.
But.......Nothing....hmph! The engine still does not successfully transcribe
my voice.
Can anyone with any experience with what I am trying to do, explain where I
am going wrong? Or where I should look to find out what the problem is?
I am not getting any errors and I can find all the registry values with the
file placed in the folder that is written in the registry as well.