using subprocess

This commit is contained in:
talksik
2023-04-27 16:53:02 -07:00
parent 651e37b0d3
commit 0c1eb26ae7
+2 -5
View File
@@ -1,18 +1,15 @@
import time
import os
from subprocess import call
def robot(text):
print("executing command")
command = 'espeak --stdin "' + text + '" | aplay -D plughw:2,0 '
os.system(command)
return command
call(['espeak', '--stdin', '"Hello world how are you doing today?"', '|', 'aplay', '-D', 'plughw:2,0'])
if __name__ == '__main__':
while True:
try:
print("initializing")
command = robot("Hello world how are you doing today?")