|
|
|
|
|
|
|
Page Views :
|
218849
|
|
Downloads :
|
10927
|
|
Rating :
|
Rate it
|
|
Level :
|
Intermediate
|
|
|
|
|
Download
Files:
|
|
|
|
|
|
|
|
|
|
|
Description
This article provides some elementary information about how to implement Speech Recognition capabilities in to your applications. The tools we would use to speech enable would be the speech SDK 5.1. Speech SDK 5.1 is the latest release in the speech product line from Microsoft. Speech SDK 5.1 can be used in various programming languages.
Introduction
Speech is one of the most natural way to interact. When it comes to computers it is no different. If an application can be controlled solely by way of voice commands then the opportunity that lies is unlimited. Even though the idea of using speech as an input mechanism for an application is not new there are not a lot of applications that use speech as in input. In other words speech is still an big opportunity that is yet to be explored.
Microsoft speech SDK is one of the many tools that enable a developer to add speech capability in to a applications. Speech SDK can be used in either C#, C++, VB or any COM compliant language.
Broadly, speech can be divided in to two paradigms. Text to speech conversion and speech recognition. In this article I shall be focusing on the speech recognition conversion.
Command & Control Vs. Dictation
Speech recognition can be of two types based on the grammar that the recognition is based on. (Grammar is in other words the list of possible recognition outputs that can be generated.) An application can limit the possible combination of the words spoken by choosing proper grammar.
In a command and control scenario a developer provides a limited set of possible word combinations, and the speech recognition engine matches the words spoken by the user to the limited list. In command and control the accuracy of recognition is very high. It is always better for applications to implement command and control as the higher accuracy of recognition makes the application respond better.
In Dictation mode the recognition engine compares the input speech to the whole list of the dictionary words. For the dictation mode to have a high accuracy of recognition is it important that the user has prior trained the recognition engine by speaking in to it. The training or creating of a profile can be done by using the speech properties in the control panel.
Speech Recognition Engines
There are two different speech recognition engines, namely a Shared Recognition engine and an InProc recognition engine. A shared recognition engine can be shared across applications. This is the engine one would use when there could be multiple applications looking for speech input. A shared recognition context is the recommended for most speech applications. On large speech applications that run on server alone an InProc speech recognition context is better suited.
The speech recognition engine interacts with applications using events that could be subscribed to by the application. A couple of the most important events are the recognition event and the hypothesis event. these event are raised when the engine make a good recognition or an hypothesis respectively. The code along with this article will show how to subscribe to these events.
Sample Application
The sample application with this article gives a idea to a developer on the steps one need to take in order to speech enable the menus in an application. The listing below shows a few of the important steps.
// Get an insance of RecoContext. I am using the shared RecoContext. objRecoContext = new SpeechLib.SpSharedRecoContext(); // Assign a eventhandler for the Hypothesis Event. objRecoContext.Hypothesis += new _ISpeechRecoContextEvents_HypothesisEventHandler(Hypo_Event); // Assign a eventhandler for the Recognition Event. objRecoContext.Recognition += new _ISpeechRecoContextEvents_RecognitionEventHandler(Reco_Event); //Creating an instance of the grammer object. grammar = objRecoContext.CreateGrammar(0); //Activate the Menu Commands. menuRule = grammar.Rules.Add"MenuCommands",SpeechRuleAttributes.SRATopLevel| SpeechRuleAttributes.SRADynamic,1); object PropValue = ""; menuRule.InitialState.AddWordTransition(null,"New"," ,SpeechGrammarWordType.SGLexical,"New", 1, ref PropValue, 1.0F ); menuRule.InitialState.AddWordTransition(null,"Open"," ",SpeechGrammarWordType.SGLexical,"Open", 2, ref PropValue, 1.0F ); //Commit the grammar rules for reco. grammar.Rules.Commit(); grammar.CmdSetRuleState("MenuCommands", SpeechRuleState.SGDSActive);
The screen shot below shows the main form of the sample application.

Summary
This article gives an introduction to speech recognition using the Speech SDK 5.1.
|
|
Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post
Here.
|
|
|
|
|
Login
to add your contents and source code to this article
|
|
|
|
|
|
|
|
|
|
|
|
Suhil Srinivas
Suhil Srinivas is a seasoned developer, developing applications using various microsoft technologies. Suhil is a MCP and has been actively involved in mentoring and helping new-comers. He has a rich experience of building web, wireless and backend systems and has been doing consulting for various enterprises. Suhil in particular has been working a lot with the credit card and payment processing industry. EKS as a company has several products for the Educational institutes of any size. One of the chief products is the School-ERP system, which completely revolutionizes the day-to-day operation of an educational institute. Among other products EKS also has products for the small and medium healthcare providers. EKS is in to consulting and does offshore development for its customers from its office at Bangalore, India.
|
|
|
|
|
|
|
|
|
C# Consulting is founded in 2002 by the founders of C# Corner. Unlike a traditional
consulting company, our consultants are well-known experts in .NET and many of them
are MVPs, authors, and trainers. We specialize in Microsoft .NET development and
utilize Agile Development and Extreme Programming practices to provide fast pace
quick turnaround results. Our software development model is a mix of Agile Development,
traditional SDLC, and Waterfall models.
|
|
Click here to learn more about C# Consulting. |
|
|
|
|
|
|
|
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon.
Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees.
As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
|
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
|
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
|
ASP.NET 4 Hosting
Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites – Click Here!
|
|
|
|
|
|
|
|
|
|
|
|
|