python 3.x speech module [closed]

帅比萌擦擦* 提交于 2019-12-08 04:28:09

问题


Is 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.


回答1:


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!")



回答2:


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.




回答3:


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



来源:https://stackoverflow.com/questions/3275663/python-3-x-speech-module

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