python 3.x speech module [closed]
开发者_运维百科
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this questionIs there pyTTS or some kind of speech module for python 3.0? I can't seem to find it anywhere and I'd really like to try it out.
On windows, simplest way would be to directly access SAPI using python com interface, e.g.
import win32com.client
speaker = win32com.client.Dispatch("SAPI.SpVoice")
speaker.Speak("Hello, it works!")
Festival is the only TTS engine for Linux I know of, and it has pyfestival - http://code.google.com/p/pyfestival/ .
In the past I wrote my own bindings because the interface was so simple.
I'm using win7 x64. I installed pywin32 and Anurag Uniyal's answer worked.
Here is the latest build at the time of this writing. http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/
You see there are 2 versions:
pywin32-218.win32-py3.1.exe
pywin32-218.win-amd64-py3.1.exe
Keep in mind that even if your OS is 64b, you might have installed python3 32b or python3 64b. For example, I have win7 x64 but I installed python3 32b. If that's your case, choose win32; if not chose amd64.
Good luck
精彩评论