micro_speech

Example of the component espressif/esp-tflite-micro v1.3.1

Micro Speech Example

This example shows how to run a 20 kB model that can recognize 2 keywords, "yes" and "no", from speech data.

The application listens to its surroundings with a microphone and indicates when it has detected a word by displaying data on a screen.

Deploy to ESP32

The following instructions will help you build and deploy this sample to ESP32 devices using the ESP IDF.

The sample has been tested on ESP-IDF version release/v4.2 and release/v4.4 with the following devices:

Install the ESP IDF

Follow the instructions of the ESP-IDF get started guide to setup the toolchain and the ESP-IDF itself.

The next steps assume that the IDF environment variables are set :

  • The IDF_PATH environment variable is set
  • idf.py and Xtensa-esp32 tools (e.g. xtensa-esp32-elf-gcc) are in $PATH

Building the example

Set the chip target (For esp32s3 target, IDF version release/v4.4 is needed):

Plaintext

idf.py set-target esp32s3

Then build with idf.py

Plaintext

idf.py build

Load and run the example

To flash (replace /dev/ttyUSB0 with the device serial port):

Plaintext

idf.py --port /dev/ttyUSB0 flash

Monitor the serial output:

Plaintext

idf.py --port /dev/ttyUSB0 monitor

Use Ctrl+] to exit.

The previous two commands can be combined:

Plaintext

idf.py --port /dev/ttyUSB0 flash monitor

Sample output

  • When a keyword is detected you will see following output sample output on the log screen:

Plaintext

Heard yes (<score>) at <time>

To create a project from this example, run:

idf.py create-project-from-example "espressif/esp-tflite-micro=1.3.1:micro_speech"

or download archive (~153.36 KB)