I'm using eSpeak on Ubuntu and have a Python 2.7 script that prints and speaks a message:
import subprocess text = 'Hello World.' print text subprocess.call(['espeak', text]) eSpeak produces the desired sounds, but clutters the shell with some errors (ALSA lib..., no socket connect) so i cannot easily read what was printed earlier. Exit code is 0.
Unfortunately there is no documented option to turn off its verbosity, so I'm looking for a way to only visually silence it and keep the open shell clean for further interaction.
How can I do this?
See Python os.system without the output for approaches specific to os.system - although modern code should normally use the subprocess library instead.
os.systemsyntax. Though it is just for illustration. Stick with subprocesssubprocess.DEVNULsolution.