User manual
Ausgabe 27.12.2017 Copyright by Joy-IT 14
3
Talking-Pi
Please be sure to replace the placeholder with your own command.
You may also need to correct the indentaons aer copying.
To do this, simply refer to the exisng command denions.
Within the newly dened command calls, three dierent les are called.
The rst two les ("/home/pi/I2C-LCD/EigenerBefehl. py" and "/home/pi/TalkingPi_Befehle/Receiver/
EigenerBefehl") dene the acons that are called when the corresponding voice command is executed.
In this example, the rst le represents the output on the display and the second le represents the
actual command sequence.
The third le dened the sound that will be output as soon as the voice command is detected.
You can of course enter as many les as you like here.
The structure of the three les (display, command, sound) created by us serves only as an overview.
elif '[Ihr eigenes Sprachkommando]' in text:
subprocess.call(["python","/home/pi/I2C-LCD/EigenerBefehl.py"])
subprocess.call(["bash","/home/pi/TalkingPi_Befehle/Receiver/
EigenerBefehl"])
subprocess.Popen(["aplay", "/home/pi/GassistPi/src/resources/dong.wav"],
stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
time.sleep(2)