I am writing a simple program for converting text into speech using SAPI in windows form application using C++ Visual studio 2010. I got this link in which speech synthesis and recolonization, both are given. So, I make it simple and take out only needful line. Till now my code is working fine. Here are the lines I take out:-
SpeechSynthesizer^ speaker;
speaker = gcnew SpeechSynthesizer();
String^ speech;
speech = "Hello"
speaker->Speak(speech);
Now ,I decide to use male voice in place of female voice. For this I got the list of available voices from here. So I add this line in my code:-
speaker->SelectVoice("David");
My code is building fine , but when I run my code and click on my GUI button, I got this error So, please tell me what is the actual way to select male voice.
Aucun commentaire:
Enregistrer un commentaire