Friday, March 6, 2009

Get Speech (Voice) from any (typed) text with QTP

Get Speech for any Text (Typed) with below code:-


Dim message, sapi
message=InputBox("What do you want me to say?","Speak to Me")
Set sapi=CreateObject("sapi.spvoice")
sapi.Speak message

Pre requisite: Install “Microsoft’s speech API” (SAPI) in your machine.

No comments:

Post a Comment