Questions tagged «espeak»

5
如何在Python 2.7中隐藏子进程的输出
我在Ubuntu上使用eSpeak,并且有一个Python 2.7脚本可以打印和显示一条消息: import subprocess text = 'Hello World.' print text subprocess.call(['espeak', text]) eSpeak产生所需的声音,但由于一些错误(ALSA lib ...,没有套接字连接)而使外壳混乱,因此我无法轻松读取之前打印的内容。退出代码为0。 不幸的是,没有记录的选项可以关闭其详细信息,因此我正在寻找一种方法,仅在视觉上使其静音并保持打开的外壳干净以进行进一步的交互。 我怎样才能做到这一点?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.