Inflect-Nano-v2 for ESP32-P4 (ESP-DL)
This is an ESP-DL deployment of Inflect-Nano-v2 that accepts raw English text and generates 24 kHz mono PCM entirely on an ESP32-P4. The host supplies power and text and can capture the returned PCM; it does not compute phonemes, tokens, latent tensors, or waveform samples.
The release converts and quantizes the original weights for fixed-shape ESP-DL graphs. It does not retrain, distill, fine-tune, or replace the upstream voice.
Board audio: play the 0.469 s Ready. capture.
It was captured from the connected board.
What is included
| File | Purpose |
|---|---|
models/inflect_tts_models_short64.espdl |
T49 acoustic graph, Flow48, and T64/T96 waveform decoders |
models/inflect_flow96_models.espdl |
Flow96 route for longer latent sequences |
assets/inflect_full_assets.bin |
Fixed frontend and model support assets |
samples/ready-flow48.wav |
Exact 24 kHz mono board capture |
artifact-manifest.json |
Source revisions, licenses, sizes, and SHA-256 hashes |
The complete buildable firmware, host capture tool, paper, and source-level provenance are in inlanger/esp32-p4-inflect-tts.
Measured result
Hardware: ESP32-P4 revision 1.3, two 360 MHz high-performance RISC-V cores, 32 MiB PSRAM, and 16 MiB flash. Software: ESP-IDF 6.0.2, ESP-DL 3.3.9 plus the included patch, and eSpeak-NG 1.52.0.
For the raw-text request Ready.:
| Measurement | Result |
|---|---|
| Acoustic model | 86.827 ms |
| Flow48 | 234.609 ms |
| T64 waveform decoder | 1,335.012 ms |
| Learned stages, summed | 1,656.448 ms |
| Complete measured request | 3,766.705 ms |
| Output | 11,264 samples / 0.469333 s |
| Learned-path RTF | 3.530 |
| Complete-request RTF | 8.026 |
The two RTF values answer different questions. 3.530 covers the acoustic,
flow, and waveform networks. 8.026 is the complete captured request reported
by the board, including the rest of the current service path. The decoder
returns a complete buffer. This release makes no realtime or native-streaming
claim.
Intended use
This package is for offline, short English prompts on an ESP32-P4: status announcements, values read from a display, appliance feedback, alarms, and other cases where the device must synthesize previously unknown text without a server. It is also a reproducible reference for porting a multi-stage neural TTS pipeline to constrained hardware.
It is not a drop-in Transformers model. The .espdl files require the pinned
firmware and patched ESP-DL runtime from the source repository.
Build and run
The shortest reproducible path is the source repository:
git clone https://github.com/inlanger/esp32-p4-inflect-tts.git
cd esp32-p4-inflect-tts
git checkout f5701f9f92e92522086233d6c10879c07740b10f
./tools/build_inflect_p4_release.sh
With the board attached:
PORT=/dev/cu.usbserial-3110 ./tools/build_flash_inflect_p4_service.sh
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txt
python tools/run_inflect_p4_service.py \
--port /dev/cu.usbserial-3110 \
--text "Ready." \
--output captures/ready.wav
The source repository already pins byte-identical copies of these model artifacts. To obtain this model package separately:
hf download inlanger/inflect-nano-v2-esp32p4-espdl \
--local-dir inflect-nano-v2-esp32p4-espdl
Provenance
- Upstream model:
owensong/Inflect-Nano-v2 - Upstream revision:
1cbf8079a95a87e013999321fb79fda8b9025238 - Upstream checkpoint SHA-256:
bfca468489c9069361d6b87b295a17eef611af8ff09854ce0b80305d9122f5b3 - Research source boundary:
f14bf17d91eb5835dee93e8dc6f5b80ef8b57a09 - Public firmware/source revision:
f5701f9f92e92522086233d6c10879c07740b10f
The sample WAV is a byte-for-byte copy of the retained connected-board gate.
Its raw JSON telemetry and the sanitized decoder-analysis supplement are in the
linked source repository under evidence/.
Limitations
- English only and one male voice.
- No voice cloning, speaker selection, or multilingual claim.
- Complete-buffer output rather than a causal or chunked streaming decoder.
- Fixed graph buckets and bounded request lengths; see the source repository and paper for the exact routing limits.
- Verified on ESP32-P4 revision 1.3. The checked-in configuration is not a firmware image for revision 3.x boards.
- The retained WAV demonstrates one short phrase, not broad subjective or objective quality coverage.
- Host-side latency, flash layout, and board configuration can change the complete-request timing.
Do not use synthetic speech to impersonate people or misrepresent its origin. This release has not been validated for emergency, medical, legal, or other safety-critical speech. Applications that depend on intelligibility should provide a non-speech fallback.
License
Inflect-derived model packages and fixed assets follow the upstream
Apache-2.0 terms. The ESP-DL patch and full firmware are distributed only in
the linked GitHub repository; the firmware has a separate GPL-3.0-or-later
boundary because it embeds eSpeak-NG. See LICENSES.md and
THIRD_PARTY_NOTICES.md.