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.ca
As of Python3 you no longer need to open devnull and can call subprocess.DEVNULL.
Your code would be updated as such:
import subprocess text = 'Hello World.' print(text) subprocess.call(['espeak', text], stderr=subprocess.DEVNULL)