Ok, so we want to make our Windows Pc speak, right?
1. We import our module win32com
2. We create our istance of the class Dispatch passing the SAPI.spVoice string as arguments (that's the voice used by the pc)
3. Then we are ready to make the pc talk... easy and fast!
>>> import win32com.client as wincl
>>> speak = wincl.Dispatch("SAPI.SpVoice")
>>> speak.Speak("You will break that stuff, dude")
But first you have to install the win32com module.
1. We import our module win32com
2. We create our istance of the class Dispatch passing the SAPI.spVoice string as arguments (that's the voice used by the pc)
3. Then we are ready to make the pc talk... easy and fast!
>>> import win32com.client as wincl
>>> speak = wincl.Dispatch("SAPI.SpVoice")
>>> speak.Speak("You will break that stuff, dude")
But first you have to install the win32com module.
Comments
Post a Comment