一开始我会说这里有一个类似的帖子:How to use espeak with python和我正在使用这个帖子的答案,但我仍然收到错误,所以也许你可以帮助我解决它。
import subprocess
text = '"Hello world"'
subprocess.call('espeak '+text, shell=True)这段代码给了我一个错误:
'espeak' is not recognized as an internal or external command,
operable program or batch file.ps。我想我安装espeak是正确的,因为我可以在CMD行中使用:
espeak "text"它会正确地说出"text“。
PS2。这个问题的答案可能就是我之前发布的另一个问题的答案。(How to save the output of PyTTSx to wav file)
发布于 2016-08-18 20:08:37
import subprocess
subprocess.call(['ping', '127.0.0.1'], shell=True)https://stackoverflow.com/questions/39017808
复制相似问题