To add your own voice commands, which the talking Pi recognizes as a separate command, it is necessary to first define the command as an expected input.
This increases the detection rate.
Open the file “googlecloudtalkingpi. py” with the following command:

Add the following recognizer. expect_phrase command to the existing phrases:

Replace the placeholder with your own voice command.

Now that we have defined the expected speech input, it is now possible to define the command from actual recognition.
To do this, add the following content to the existing definitions as the file is opened.

Within the newly defined command calls, three different files are called.
The first two files (“/home/pi/I2C-LCD/OwnCommand. py” and “/home/pi/TalkingPi_Befehle/Receiver/YourCommand”) define the actions that are called when the corresponding voice command is executed.

In this example, the first file represents the output on the display and the second file represents the actual command sequence.
The third file defined the sound that will be output as soon as the voice command is detected.
You can of course enter as many files as you like here.

The structure of the three files (display, command, sound) created by us serves only as an overview.
Please note that the files to be executed must still be created by you in the corresponding folders.

You can of course define as many files as you need.
In our standard configuration we have defined the following files for execution.
These can be used for your personal configuration.


File location: /home/pi/I2C-LCD/[Your File].py



File location: /home/pi/GassistPi/src/resources/[YourSoundFile].wav

Other command file to be executed:

File location: /home/pi/TalkingPi_Befehle/
File format: .sh

Note: The individual command files are subdivided into the following folders: Projector, Light, Computer and Receiver.
You can of course add more categories.
However, please make sure that you specify them correctly when referencing files.

After restarting your talking pi, your new voice command should be recognized and processed successfully.