I did it by creating OLE object with Delphi in 2000/NT/XP as following:
Voice := CreateOLEObject('SAPI.SpVoice'); Voice.speak(...)
But this does not work in Vista, how can I make my program simply speak some text in Vista?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I just tried (D2009 on Vista Home Premium) with the following code and it works!
FYI, there is a nice paper on using speech in Delphi programming by Brian Long…
(Very) Late Update:
For why it might not work in Vista and give an EZeroDivide exception outside the IDE, see this other SO question: Delphi SAPI Text-To-Speech