[TensorFlowLite] Deploy issue: micro_speech example project using platformIO on Visual Studio Code

Hello, I’m trying to create a project on Visual Studio Code using platformIO and I want to develop it on a ESP32 board but I’m having some problems. Can you help me?

Environment

  • Development Kit: ESP32-DevKitC
  • Kit version DevKitC: v4
  • Module or chip used: ESP32-WROOM-32D
  • IDF version : v4.2.1
  • Build System: CMake
  • Compiler version : 8.4.0
  • Operating System: Windows
  • Windows environment type: ESP Command Prompt and PowerShell.
  • Using an IDE?: Yes → Visual Studio Code
  • Power Supply: USB

Problem Description

I want to load the speech_recognition example of tensorflow lite on my board (esp32 wroom 32d). I can build and load the code but in the serial monitor I visualize:

"Rebooting…
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1252
load:0x40078000,len:12692
load:0x40080400,len:3100
entry 0x400805ec
assertion “buf” failed: file “src/esp/ringbuf.c”, line 51, function: rb_init

abort() was called at PC 0x400e82a3 on core 1"

Can you link to the exact project you’re using? (code, platformio.ini, etc.)

TensorFlowLite micro_speech
Starting from this repository I have developed the project for esp32 following the instruction and then I have imported this on VSC.
This is the cose of my platformio.ini:

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
platform_packages =
    toolchain-xtensa32@~2.80400.0
    framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git"

I have made some changes to that repository following the page of towardsdatascience about tensorflow-meet-the-esp32

Can you upload your exact project folder somewhere (e.g., github, google drive) so that we have are working on the exact same project as you?

Of course…
https://unipiit-my.sharepoint.com/:u:/g/personal/v_staderini_studenti_unipi_it/EU5IlVsuiaZJoYBX-KKu2rwBG1i4eOZn91s8rWW657go2g?e=ERoFLh

Thank you very much for your help

‘ringbuf.c’ creates the buffer in psram, but ESP32-DevKitC dose not have psram. Use:
’ buf = calloc(1, size);’
without checking for psram

for a general case solution refer to the discussion @