Grove vision ai how to run the model for audio recognition?

I found this works…
YMMV​:grin::v:
To run your Edge Impulse keyword detection model in real time on the Grove Vision AI module, you need to use the Edge Impulse CLI (Command Line Interface) tool on your computer, as existing examples focus on the camera. The Grove Vision AI module (original V1) has a built-in microphone, which the Edge Impulse firmware can access for data sampling and inference.

Steps for Real-Time Keyword Detection

  1. Ensure Correct Firmware:
  • Make sure the Grove Vision AI module is flashed with the latest Edge Impulse firmware. Instructions can be found in the Edge Impulse documentation.
      • This firmware allows the Edge Impulse CLI to communicate with the board, including accessing its sensors like the microphone.
    1. Connect to Your Computer:
  • Connect the Grove Vision AI Module to your PC via a USB Type-C cable.
  1. Run Inference using the CLI:
  • Open a terminal or command prompt on your computer.
  • Run the following command to start real-time inferencing:

edge-impulse-run-impulse --debug

    • This command connects to the board, streams the raw microphone data to your computer, runs the trained model, and prints the results to the console in real time.
  1. Observe Results:
  • The console will display the recognized keywords and their confidence scores as you speak into the microphone.

Alternative: Deployment as an Arduino Library

If you need the module to run autonomously without being connected to a PC via the CLI, you can deploy your model as an Arduino library:

  1. Download the Library: In the Edge Impulse studio, go to the Deployment section and select Arduino library. Download the generated ZIP file.
  2. Install the Library: In the Arduino IDE, go to Sketch > Include Library > Add .ZIP Library and select the downloaded file.
  3. Use the Example Sketch:
  • Open the example sketch provided within the newly installed library.
  • The example code often demonstrates how to use the built-in microphone for keyword spotting (look for examples related to Pdm or microphone). You may need to adapt it slightly to fit your specific model’s output and desired actions.
    • Upload the code to your associated microcontroller (like a Wio Terminal or a XIAO board, as the Grove AI Module typically acts as a coprocessor).
  • Monitor the serial monitor for the real-time detection results.

Since official examples for the Grove Vision AI module with a microphone are less common compared to camera examples, using the Edge Impulse CLI or the custom Arduino library with its built-in example code are the most reliable methods for real-time operation.

HTH
GL :grin: PJ :v: