Click here to Skip to main content
15,896,111 members

Comments by vambe william (Top 2 by date)

vambe william 25-Mar-11 18:13pm View    
the code given at this site that converts speech to text.

i have this 1 again

private void btnListen_Click(object sender, EventArgs e)
{
// Speech Recognition Object
SpSharedRecoContext listener;

// Grammar object
ISpeechRecoGrammar grammar;

listener = new SpeechLib.SpSharedRecoContext();
listener.Recognition += new _ISpeechRecoContextEvents_RecognitionEventHandler (listener_Reco);
grammar = listener.CreateGrammar(0);
grammar.Dictationload("", SpeechLoadOption.SLOStatic);
grammar.DictationSetState(SpeechRuleState.SGDSActive);
}

public void listener_Reco(int StreamNumber, object StreamPosition, SpeechRecognitionType RecognitionType, ISpeechRecoResult Result)
{
string heard = Result.PhraseInfo.GetText(0, -1, true);
textBox1.Text += heard;
}

but i dont know how to add a SpSharedRecoContext object and create an ISpeechRecoGrammar object for it. Then Add a RecognitionHandler to it...

Add another Button and a TextBox to your form and create the objects there. Then add a handler to tie into the listeners Recognition event...
vambe william 25-Mar-11 18:05pm View    
thanxz, so do you have that English language pack apart from the one provided on this site....