Is it possible to make computer (windows or linux, mac) speak in perl ? I know it is possible with VB script. But how about perl ?
In VB we just write
CreateObject("SAPI.SpVoice").Speak"I can speak "
How do we do this in perl ?
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.
The Speech::Synthesis module can interface to Microsoft’s SAPI 5 API, which it looks like you’re using in VB. There’s also Win32::SAPI5, which is Windows-specific but may offer more control, or you can just use Win32::OLE:
Of course, if you’re going to speak multiple times, you’d probably want to create the object only once, store it in a variable, and call
Speakmultiple times on it.