Hi Friends,,,
I want to know how can i develop a speech recognition app.
I have already done the opposite side which is converting text to speech.
simply what i want to develop is,
user speaks using the microphone.
then the application should track the "word" he says and output that word to a textbox.
after the application is loaded, it should automatically capture the word he says.
he doesn't need to click any button.
im using win XP and VS2008(.net 3.5)....C# language
if you could please give me a hand to do this asap.....
Charith
Loading
Kirtan PatelPosted Dec 31, 2009, 8:19 AM
check "do you like this answer check box if it help you :)
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;
}
Mahesh ChandPosted Nov 3, 2010, 10:44 PM
John BartolucciPosted Nov 3, 2010, 10:34 PM
Project compiles w/o error, but when I start the speech reco. event. it throws Exceptions and crashes.
Will it be possible to continue using SAPI 5.x w/o forcing my C# project back to 32-bit proc. only? I'm currently running VS2010 on a x64/Win7 machine.
Charith LiyanagamagePosted Jan 2, 2010, 8:50 AM
It works......I installed SDK 5.1. Now it's working. Thanks a lot......
:)
Charith
Mahesh ChandPosted Jan 2, 2010, 1:50 AM
Programming Speech in WPF - Speech Synthesis
It's in WPF. If you want to use Windows Forms, you can still use same SAPI.
Charith LiyanagamagePosted Jan 1, 2010, 11:47 PM
I cant find any key words like SpSharedRecoContext,ISpeechRecoGrammar,DictationLoad,DictationSetState.....etc in VS2008.
And also whatever the library class that u hv mentioned.(SpeechLib)
As class references I have inserted both using System.Speech.Synthesis; and using System.Speech.Recognition;
please fix this issue and send me the solution.
And please mention if i need to install some 3rd party tool for this. I'm using windows XP SP2 with visual Studio 2008 Team System
Thanks.....
Charith