Block description

This block can be used to set voice control commands or triggers and thus provide real-time voice inputs from your mobile device to the board.

This block houses other non-Advanced blocks inside it corresponding to the code to be run on the board for each trigger. Once the project is uploaded, these blocks are executed on the board when the voice trigger is detected on the mobile device.

App interface and usage

Voice trigger:

Here, you can press and hold the Record button to set a voice trigger or command.
Voice 1
Voice 1

The voice command detected is displayed where you can set the Voice trigger or try again.
Voice 1

Once the Voice trigger is set, you can reset the trigger at any time.
Voice 1

After this, blocks to be executed on the board in response to the Voice trigger must be dragged inside the body of the block.

After the code is uploaded to the board(s), you can control the board using voice commands from the Voice screen.
Voice 5
The status of each trigger sent to the board can be seen on this screen.

Guidelines

  1. A maximum of 4 words are allowed in a Voice trigger.
  2. A project can contain a maximum of 4 Voice blocks.
  3. The blocks inside each Voice block are run only as many times as they are included inside the block. Repetitions, if needed, are to be implemented using the Loop block inside the Speech block.
  4. Each Voice trigger and the corresponding code it runs on the board is unique, and independent of any other trigger. If you want the blocks included in 1 Voice block to continue running when the next Voice trigger is used, the next Voice trigger should contain the desired (blocks) from the previous Voice block in addition to the new blocks.

Example

  1. This project uses 2 Voice triggers ‘LED on’ and ‘LED off’. Whenever the Voice trigger ‘LED on’ is detected on the mobile device, the LED on the board turns green. Similarly, if the words ‘LED off’ are detected on the mobile device, the LED on the board turns off.
    Voice Ex

After this project is uploaded to the board, the screen transitions to the below.
Voice 5
Here, after the voice trigger 'LED On' is detected, the detected voice trigger is highlighted as shown below.
Voice Ex 2