Here is simple application which makes use of COM Library and
with some lines of code you can give any application a voice.
This example and the application explain three concepts.
1. Adding COM references to your Project.
2. Declaring and using relevant object.
3. Adding voice responses as your application.
1. Adding COM references to your Project.
Open a new windows form application and add Textbox and Button. To add link the relevant reference follow these steps
Right click your project node in solution explorer in which you want to add reference --> click Add Reference
In the Add Reference explorer window select the COM component from the COM tab or use browse option if you want to add specific dll from another resource. For this example you can add sapi.dll following path below
%windows%/System32/Speech/Common/sapi.dll
you may copy this dll into your bin folder which makes it easy to reference and some times it is feasable to provide dll with your installation package as your windows might lack it.
2. Declaring and using relevant object.
// add this reference to your assembly
using SpeechLib;
// Declare object in the class


Asad ButtPosted Aug 24, 2009, 1:03 PM
will edit this blog with firther sample code soon