simplifying

This commit is contained in:
talksik
2023-04-27 17:02:34 -07:00
parent 5c9edb18ab
commit ef04b23827
+2 -6
View File
@@ -1,15 +1,11 @@
import time
from subprocess import Popen, PIPE
import os
def robot(text):
print("executing command")
espeak = Popen(
['espeak', '--stdin "Hello world how are you doing today?"'], stdout=PIPE)
aplay = Popen(['aplay', '-D plughw:2,0'], stdin=espeak.stdout, stdout=PIPE)
espeak.stdout.close() # enable write error in dd if ssh dies
out, err = aplay.communicate()
os.system("espeak -w output.wav \"" + text + "\"")
if __name__ == '__main__':