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 indentaons aer copying.
To do this, simply refer to the exisng command denions.
Within the newly dened command calls, three dierent les are called.
The rst two les ("/home/pi/I2C-LCD/EigenerBefehl. py" and "/home/pi/TalkingPi_Befehle/Receiver/
EigenerBefehl") dene the acons 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 dened 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)