If you want to develop a TTS application in .net enviroment, you should do the following steps i gave:
1.
Install the Microsoft TTS. You can download this from the microsoft website.
2. Import COM object into the .net.
Use this:
C:/WINNT/Speech>Tlbimp vtxtauto.tlb /namespace:DotNetSpeech_E /out: DotNetSpeech_E.dll
- Right click “Reference” on the “Solution Explorer”, and select “Add Reference”, in the dialog popped up, choose the file “DotNetSpeech_E.dll”
- When you want the read the text, you should write the following code:
try
... {
if(text!="")
...{
DotNetSpeech_E.IVTxtAuto IVTA = new DotNetSpeech_E.VTxtAutoClass();
IVTA.Register(" "," ");
IVTA.Speak(text,0);
}
}
catch (System.Exception ec)
... {
MessageBox.Show((ec.ToString),"SpeechApp",MessageBoxButtons.OK,System.Windows.Forms.MessageBoxIcon.Error);
}
... {
if(text!="")
...{
DotNetSpeech_E.IVTxtAuto IVTA = new DotNetSpeech_E.VTxtAutoClass();
IVTA.Register(" "," ");
IVTA.Speak(text,0);
}
}
catch (System.Exception ec)
... {
MessageBox.Show((ec.ToString),"SpeechApp",MessageBoxButtons.OK,System.Windows.Forms.MessageBoxIcon.Error);
}