Repository navigation
tflite: builds and runs on the ESP32-S31 - #687
Merged
Merged
Conversation
The module now builds for the ESP32-S31 as well as the P4 and S3. The component manager resolves esp-nn 1.5.0 for esp-tflite-micro 1.3.7, and that esp-nn gives the S31 the P4's RISC-V PIE kernels, so nothing else changes. Checked on a Waveshare ESP32-S31-Touch-LCD-4.3C built with --modules all,tflite,btclassic: import tflite works, the microWakeWord hey_jarvis model loads (19,728-byte arena) and runs in 3.8 ms per predict(), and medialink's MicroWakeWord fires on two spoken "Hey Jarvis" clips fed digitally and on all six plays through the board's own microphones. tflite adds 436 KB to the image (7,577,600 bytes against 7,141,120).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tflitenow builds for the ESP32-S31 as well as the P4 and S3, so microWakeWord and other TensorFlow Lite Micro models run there. Nothing else in the module changes. esp-tflite-micro 1.3.7 resolves esp-nn 1.5.0, which gives the S31 the P4's RISC-V PIE kernels.I checked it on a Waveshare ESP32-S31-Touch-LCD-4.3C built with
--modules all,tflite,btclassic.import tfliteworks and the hey_jarvis microWakeWord model loads with a 19,728-byte arena. Onepredict()takes 3.8 ms (1.8 ms on a P4). Two spoken "Hey Jarvis" clips fed digitally intomedialink.wakeword.MicroWakeWordboth fire. Through the board's own microphones, with the clips played from a nearby speaker, the Wake word app caught all six plays.tflite adds 436 KB to the image: 7,577,600 bytes against 7,141,120 for
all,btclassic. That no longer fits beside the 9,088 KB filesystem the LCD-4.3C had, so building with tflite moves the filesystem to 8,896 KB. Copy your files off before you flash.Not covered: the S31 Zero (only the LCD-4.3C was flashed), and a CI build of the S31 with tflite, since no workflow builds that combination.