python 3.x speech module [closed]

Deadly 提交于 2019-12-06 21:03:31

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!