Repository navigation
Releases
v2.0.2
Satellite1 XMOS firmware v2.0.2
A follow-up to v2.0.1 that moves to lib_voice 2.0.0, locates wake words past a TV or fan, and levels the wake word channel with an AGC of its own. The SPI device-control protocol stays 0x11, and every change to it adds something. A host written for v2.0.1 keeps working.
The headline changes:
- Wake words are located past a TV or fan. Before, the wake word steering pointed the beam at the interferer. In simulated rooms it was 110–170° off the talker for every wake word after the first, even with the talker 4–8 dB louder. Now 8 of 9 wake words over a TV and 9 of 9 over a fan land within 45° of the talker (before: 0 and 1 of 9).
- New
AUDIO_SERVICER_CMD_CH1_AGC(12), on by default, levels the wake word channel (ch1) with an AGC of its own. Talker levels from −10 to +25 dB around the usual level now reach the wake word engine at −23..−13 dBFS rms, with nothing clipped. - New
AUDIO_SERVICER_CMD_WAKE_TIMING(11) reports how long the last wake word took to reach the device. - fwk_voice 0.8.0 is replaced by lib_voice 2.0.0, its successor. This frees 27 KB of RAM on tile 0 and 40–86 KB on tile 1, and the XMOS dependencies are updated.
Behavior changes
- Channel 1 (wake word) is now levelled by default. The new AGC assumes the host multiplies the channel by 4, as ESPHome's
micro_wake_worddoes withgain_factor: 4, so Satellite1-ESPHome needs no change. Its output is divided by 4 to allow for that gain. A host that uses a different gain, or wants the old fixed mic gain, writes0toCH1_AGC. - The wake word is located from a different window. The device now uses the DOA results of the ~0.75 s before the last ~300 ms, not the last ~1.5 s. The ~300 ms it leaves out is the time a detection takes to be reported.
- The DOA reacts faster. Smoothing went from 0.95 to 0.7, so a TV that never stops isn't carried into the start of a wake word.
Wake word steering past a TV or fan
- The DOA removes steady noise. It averages the noise cross spectrum of each mic pair over frames without speech or echo, and subtracts it before the PHAT normalisation. It then weights each bin by its power over that averaged noise. PHAT alone let the bins between speech harmonics outvote the talker. With a fan, 91% of talker-dominated frames are now located (before: 10%).
- New wake rule. A direction that holds all the idle speech before the wake word now ranks nowhere (novelty 1.0), so a TV that talks all the time isn't picked. If no direction ranks above zero, the largest group wins.
- Simulated ch1 SNR in
BEAMmode, wake word / command:- TV: 3.4 / 3.5 dB → 4.2 / 4.5 dB
- noise and fan: 6.8 / 7.0 dB → 12.0 / 11.9 dB
- Tile 1 RAM: +2 KB.
Wake word channel AGC and wake timing (audio servicer, resource 230)
| Command | ID | Access | What it does |
|---|---|---|---|
AUDIO_SERVICER_CMD_WAKE_TIMING |
11 |
R | 8 bytes (versioned, version 1): timing of the last WAKE_EVENT |
AUDIO_SERVICER_CMD_CH1_AGC |
12 |
R/W | 1 level ch1 with its own AGC (default), 0 fixed mic gain. Other values return SERVICER_WRONG_PAYLOAD |
Like the other audio settings, CH1_AGC isn't saved and goes back to the default on reset.
CH1_AGC
- It's a second lib_voice AGC, running on tile 0. Its targets and soft clipping work at the level the engine sees after the host's ×4. Speech peaks sit around −9..−3 dBFS there, and are soft clipped above −6 dBFS so they never reach full scale.
- It starts at ×4 (the old fixed gain) and adapts on speech only. It can raise the gain by up to +18 dB, at +0.2 dB a frame, and lower it by up to −20 dB, at −0.5 dB a frame. Writing
1restarts it from ×4. - With the fixed gain, only about 15 dB of talker level worked. Speech 5 dB above the usual level clipped in the ×4, and speech 10–15 dB softer reached the engine at −35..−40 dBFS. Simulated, over a talker range of −10..+25 dB, the engine saw −34..+5 dBFS with up to 46% clipped. With the AGC it sees −23..−13 dBFS, with nothing clipped.
- Tile 0 RAM: +1 KB.
WAKE_TIMING
- The device fills it within a frame of each
WAKE_EVENT1, so read it ~30 ms after the write. - It gives the frames between the newest DOA result and the wake event, the number of DOA results in the wake word window, and
MIC_FRONTEND_WAKE_LATENCY_FRAMES. It also carries a wake word counter, so a host can tell a new wake word from the previous one. - In a quiet room the newest DOA result is the end of the wake word. A host can then measure the report latency (I2S path, wake word engine and SPI write) that the wake word window has to leave out.
The byte layouts are in docs/device-control-spi-protocol.md. Writes to WAKE_TIMING are rejected with CONTROL_BAD_COMMAND.
lib_voice 2.0.0 and dependency updates
-
lib_voice's AEC stores the adaptive filters in the time domain. That frees RAM on both tiles:
Variant Tile 0 / tile 1 bytes, v2.0.1 (fwk_voice 0.8.0) lib_voice 2.0.0 fixed_delay424,668 / 407,588 397,676 / 368,052 aec4424,668 / 508,340 397,676 / 421,996 These figures are for lib_voice alone, before the DOA (+2 KB tile 1) and ch1 AGC (+1 KB tile 0) changes above.
-
The NS no longer over-suppresses bins by up to 6 dB when the loudest one is cut.
-
The AEC state is sized per build variant by the
aec_conf.hthat lib_voice'sgenerate_schedule()writes. Theaec4build no longer needs a patched copy of lib_aec and lib_ic. -
lib_voice's IC no longer computes the VNR of its output, so tile 0 does that now. The AGC gets the same VNR input as before.
-
In simulation the lib_voice AEC is a few tenths of a dB weaker on average, and up to 1.4 dB weaker in its worst frames. The IC, NS, mic modes and taps are within 0.1 dB.
-
Updated dependencies:
- lib_xcore_math 3.0.1, added as
modules/lib_xcore_math - fwk_core 1.1.0, fwk_io 3.6.0, fwk_rtos 3.2.0
- lib_src 2.7.1, lib_sw_pll 2.5.0, xscope_fileio 1.3.1, lib_qspi_fast_read 1.0.2
- xmos-ai-tools 1.4.5 (
requirements.txt). The VNR now links its TFLite Micro runtime.
- lib_xcore_math 3.0.1, added as
-
Removed:
- the
lib_tflite_micro,lib_nnandlib_xuasubmodules - the unbuilt
adec,adec_alt_archandreferencelesspipelines, which were written against the fwk_voice API
- the
Building from source: run git submodule sync && git submodule update --init --recursive and pip install -r requirements.txt to pick up the new submodules and xmos-ai-tools 1.4.5. The generated VNR model source now lives in the build directory.
Voice pipeline simulation
tests/sim_voicenow builds against lib_voice and wake_agc.c, with newlevel_sweepandlevel_jumpscenarios for the ch1 AGC.- New
sim_sdbeam: a superdirective (MVDR, diffuse noise) beam and onset-based selection among 6 fixed beams, withbeam_pattern,beam_tvandbeam_noisescenarios. Neither beat delay-and-sum with the DOA fix, so neither ships. - New
sim_doa_exp: float variants ofdoa.c, with thewake_traceanddoa_reverbdiagnostics that found why the wake steering picked the interferer. - The phase-inverted run of the SNR measurement now replays the first run's steering, so both runs steer the same way.
- Results:
docs/voice-simulation.md.
Known limitations
- The wake word location, AGC level and lib_voice comparison numbers come from simulation.
- The ch1 AGC assumes the host applies ×4. With a different gain, levels at the engine are off by the difference.
- The
WAKE_TIMINGlatency reads a few frames short in a reverberant room.
Release assets
| Asset | Contents |
|---|---|
satellite1_xmos.factory.bin / .md5 and satellite1_xmos-v2.0.2.factory.bin / .md5 |
Default firmware (fixed_delay) |
satellite1_xmos_aec4.factory.bin / .md5 and satellite1_xmos_aec4-v2.0.2.factory.bin / .md5 |
Experimental aec4 firmware |
satellite_firmware_apps-v2.0.2.zip |
All build outputs (.xe, factory and upgrade images) |
satellite1-xmos-firmware_2.0.2-1_all.deb |
Debian package with the default firmware |
Full changelog: v2.0.1...v2.0.2
v2.0.1
Satellite1 XMOS firmware v2.0.1
A follow-up to v2.0.0 with better echo cancellation, a fix to the DOA speech detector, and new audio quality telemetry. The SPI device-control protocol stays 0x11, and every change to it adds something. A host written for v2.0.0 keeps working.
The headline changes:
- Both variants now cancel echo against a single (mono) speaker reference. In simulation, echo reduction with stereo music rises from 11–18 dB to 27–31 dB.
- New
AUDIO_SERVICER_CMD_REF_MIX(10) selects how that reference is mixed, so it matches what the speaker plays. aec4: the DOA now also updates during playback, so wake words spoken over music are located.- The DOA speech detector ignores low-frequency rumble (it now runs on a 100 Hz high-passed copy of the mics).
- New
STATS_SERVICER_CMD_AUDIO_QUALITY(3) reports ERLE per channel, reference drops and output clipping.
Behavior changes
- The default (
fixed_delay) build no longer models the left and right speaker channels separately. The single TAS2780 speaker plays one signal. With correlated stereo music, a two-reference AEC has no unique solution and loses its fit every time the L/R mix changes. The AEC now uses one reference, the (L+R)/2 downmix by default. This matches the TAS2780's default "Mono (Left + Right)" mode. - If the speaker plays only the left or only the right channel, the host must set
REF_MIXto match. A reference that doesn't match leaves most of the echo in place. In simulation, with the speaker on the left channel, echo reduction was ~8 dB with a mismatched reference and ~28 dB with a matched one. aec4: after playback stops, the DOA now pauses for 60 ms (it was ~400 ms). The AEC also cancels the speaker tail.
Echo cancellation and the audio servicer (resource 230)
| Command | ID | Access | What it does |
|---|---|---|---|
AUDIO_SERVICER_CMD_REF_MIX |
10 |
R/W | AEC reference: 0 (L+R)/2 (default), 1 left, 2 right. Other values return SERVICER_WRONG_PAYLOAD |
Like the other audio settings, REF_MIX isn't saved and goes back to the default on reset.
- Tile 1 RAM in the default build drops by ~93 KB because the AEC models one reference instead of two.
- Simulated double talk (talker over music): the talker's SNR on the wake word channel (ch1) improves by 6.5–12.4 dB.
aec4: DOA during playback
- The DOA now runs after the AEC, on the echo-cancelled mics.
- An echo gate (
audio/echo_gate.h) replaces the playback gate. It passes a frame to the DOA once the AEC has converged and the talker is ~10 dB above the residual echo. - In simulation, the beam ended up on the talker for 19 of 24 wake words spoken over music (previously 0 of 24). Music alone never steered it toward the speaker.
fixed_delayis unchanged: its DOA still pauses during playback and for ~400 ms afterwards.
DOA speech detector fix
- The speech-energy and noise-floor detector in
doa_process()used to read the raw, broadband mics. That was before the audio HPF, so low-frequency rumble (fans, HVAC, traffic) could raise the noise floor or trigger the speech gate. - The detector now applies the existing 100 Hz Butterworth high-pass to a private copy of all four mics. Each channel keeps its own filter history.
- This filter is always active, even when
AUDIO_SERVICER_CMD_HPFis0. It doesn't touch the streamed audio, the GCC-PHAT inputs, the beam timing or the playback gating. - Turning
AUDIO_SERVICER_CMD_HPFback on now clears the audio filter's history. - Details and validation:
docs/doa-detector-energy.md.
Audio quality telemetry (stats servicer 250)
| Command | ID | Access | Length |
|---|---|---|---|
STATS_SERVICER_CMD_AUDIO_QUALITY |
3 |
R | 32 bytes (versioned, version 1) |
The payload contains:
- the AEC and output channel counts
- flags
- a frame sequence number
- the number of reference frames dropped (oldest removed / newest discarded)
- the smoothed ERLE for each AEC mic channel, in 0.01 dB (
-32768= unavailable) - the number of samples at or above 0.99 full scale on each output channel
How it works:
- Counters saturate rather than wrap.
- Reads never clear them, and everything resets on boot.
- The audio pipeline never waits for a reader. If a read is in progress, that frame's snapshot is skipped and the counts carry over to the next one.
- No new intertile transaction is added.
The byte layout is in docs/device-control-spi-protocol.md. Satellite1-ESPHome exposes these values as hidden diagnostic sensors once it is running this firmware.
Voice pipeline simulation
- New
tests/sim_voiceharness. It runs the firmware's own DSP code (fwk_voice AEC/IC/NS, DOA, mic front end, beamformer, HPF, echo gate), compiled for the host, against simulated reverberant rooms. The rooms contain a talker, a TV, stereo music and noise. - It was used to choose the changes in this release. It also ruled some out: clearing the IC on every re-steer, beam mode as the default, and a soft limiter on ch1.
- Method, limitations and results:
docs/voice-simulation.md.
Tests
- New host tests:
tests/test_audio_quality: wire layout, ERLE edge cases, clipping boundaries, saturating drop counters, contended publication.tests/test_audio_frontend: the echo gate, the steer counter, the DOA hangover, and the detector HPF.
tests/sim_voice/test_sim_voice.py: a ~20 s smoke test of the two main simulation results.
Known limitations
- The echo reduction and DOA numbers come from simulation.
- The CPU cost of the
aec4AEC stage with the DOA after it hasn't been measured on hardware. Tile 1 RAM inaec4is ~509 KB of 512 KB. - The overhead that the audio quality telemetry adds per frame hasn't been measured on the target.
- The ERLE values are diagnostic estimates. Near-end speech and noise affect them, and they aren't limited to playback-only periods.
Release assets
| Asset | Contents |
|---|---|
satellite1_xmos.factory.bin / .md5 and satellite1_xmos-v2.0.1.factory.bin / .md5 |
Default firmware (fixed_delay) |
satellite1_xmos_aec4.factory.bin / .md5 and satellite1_xmos_aec4-v2.0.1.factory.bin / .md5 |
Experimental aec4 firmware |
satellite_firmware_apps-v2.0.1.zip |
All build outputs (.xe, factory and upgrade images) |
satellite1-xmos-firmware_2.0.1-1_all.deb |
Debian package with the default firmware |
Full changelog: v2.0.0...v2.0.1
v2.0.0
Satellite1 XMOS firmware v2.0.0
First stable release of the 2.0 line. These notes cover everything since v1.0.3, the last stable release. They include the v1.0.4 and v1.1.0 alphas and the 2.0.0 alpha and beta releases. The firmware is the same as v2.0.0-beta.2.
The headline changes:
- The firmware now uses all four microphones.
- It estimates the direction of the talker (DOA), can steer a beam at them, and can lock onto the talker when the host reports a wake word.
- The real-time pipeline is faster and more robust.
- USB is gone: upgrades run over SPI only.
- The SPI device-control protocol is now
0x11.
Read Breaking changes before upgrading a host integration.
Breaking changes
-
The SPI device-control protocol moved from
0x10to0x11.- Read responses now start with
CONTROL_RET_STATUS_PAYLOAD_AVAIL(23), followed by the payload. - Special-resource reads now return
[CONTROL_SUCCESS, value]. - One-byte reads are no longer collapsed into status-only frames.
- Device-control readiness is reported in status-buffer index
0, so the GPIO status bytes move one byte later. - Complete zero headers (
[00, 00, 00]) are transport NOPs. - A status-only frame sent after a write now carries the command's real result, no longer always
CONTROL_SUCCESS.
The current Satellite1-ESPHome firmware already speaks
0x11. - Read responses now start with
-
USB has been removed. USB DFU (
dfu-util), USB audio and USB device control are gone. Upgrade with*.upgrade.binthrough the DFU servicer (240) over SPI, which is what Satellite1 ESPHome does. -
The data partition has been removed.
*.factory.binnow holds only the boot partition, andxflashno longer takes--data. -
Firmware variants have been reduced. The
adec,adec_altarchandemptyvariants and the UA variants have been removed. Releases shipfixed_delay(default) and the experimentalaec4.bypasscan still be built locally. -
The device waits for five device-control servicers at startup, because the audio (
230) and stats (250) servicers were added. -
The mic gain moved from before the AEC to after it. The default is still 20 dB, the same level as the old fixed 10x gain. The AEC now sees a lower input level, so re-check wake word and STT tuning.
-
The release zip has been renamed from
satellite_firmware_apps.ziptosatellite_firmware_apps-<tag>.zip. -
The mic pin mapping has been fixed (v2.0.0-alpha.4). Each mic used to be labelled as the one opposite it. If your host added 180° to the DOA or reversed the mic masks to make up for this, remove that correction.
Four-mic front end and audio servicer (resource 230)
All four PDM mics (North, South, East, West) are now decimated. A new front end turns them into the two channels that the AEC/IC/NS/AGC pipeline processes.
| Command | ID | Access | What it does |
|---|---|---|---|
AUDIO_SERVICER_CMD_MIC_GAIN |
0 |
R/W | Post-AEC gain, 0–30 dB (default 20) |
AUDIO_SERVICER_CMD_MIC_MODE |
1 |
R/W | 0 East/West pair (default), 1 North/South pair, 2 average, 3 automatic pair facing the talker, 4 DOA-steered beam |
AUDIO_SERVICER_CMD_DOA |
2 |
R | Azimuth 0–359° (0 = North mic), confidence, flags |
AUDIO_SERVICER_CMD_MIC_PAIR |
3 |
R | Mic bitmask in use on channel 0 and channel 1 |
AUDIO_SERVICER_CMD_BEAM |
4 |
R | Beam steering azimuth, or 0xFFFF outside beam mode |
AUDIO_SERVICER_CMD_CH1_TAP |
5 |
R/W | Right channel: 0 AEC+IC+NS (default), 1 before NS, 2 AEC only |
AUDIO_SERVICER_CMD_IC_FAST_HOLD |
6 |
R/W | Fast IC hold on speech onset (default on) |
AUDIO_SERVICER_CMD_HPF |
7 |
R/W | 100 Hz high-pass before the AEC (default on) |
AUDIO_SERVICER_CMD_STEER_POLICY |
8 |
R/W | 0 follow speech (default), 1 wake word only, 2 fixed |
AUDIO_SERVICER_CMD_WAKE_EVENT |
9 |
R/W | The host writes 1 after a wake word and 0 when the conversation ends |
Settings are not saved, so they go back to their defaults on reset. Full details are in docs/device-control-spi-protocol.md.
Direction of arrival (DOA)
- The direction is estimated with GCC-PHAT on the N/S and E/W mic pairs. It runs only during speech and only while no audio is playing. After playback stops, it waits about 400 ms so reverb doesn't skew the result.
- The estimate is averaged over about 300 ms of speech. It uses the real mic geometry (7.1 cm between opposite mics) and rejects delays that this geometry cannot produce.
- In a simulated reverberant room, the share of directions more than 30° off dropped from about 20% to about 1%.
- The band is limited to 3 kHz, which cuts the 90th-percentile error in live rooms from 11–13° to 8–10°.
Beam mode (mic mode 4)
- The beam is a generalized sidelobe canceller. Channel 0 is a beam aimed at the talker. Channel 1 is a blocking beam that the IC uses as its noise reference.
- The beam re-steers once the talker has been more than 15° off for about 0.5 s of speech, at most every ~3 s, and only when the DOA results agree.
- Beam mode is opt-in.
- Known limits: the blocking beam is weak below ~500 Hz and has gaps at some directions above ~2.5 kHz.
Wake word steering
- The front end keeps the last ~1.5 s of DOA results. On
WAKE_EVENT = 1it steers the beam (or, in auto-pair mode, the mic pair) at the wake word within one frame. - Directions that idle speech, such as a TV, usually comes from are weighted down.
- While a conversation is active, speech does not re-steer the beam. This hold lasts at most 60 s, and each new wake word restarts it.
LED ring
- New command
LED_RING_SERVICER_CMD_DOA_INDICATOR(1), off by default. - When enabled, it lights the LED facing the talker on top of the last
WRITE_RAWframe and updates every 50 ms.
DFU and device control
- New read commands on the DFU servicer (
240):GETFLASHSERIAL(90)GETIMAGESTATUS(91)GETVARIANT(92):0fixed_delay,1bypass,2aec4. Firmware older than beta.2 answersCONTROL_BAD_COMMAND, which hosts should treat as fixed_delay.
- New stats servicer (
250):STAGE_TIMES(0): last and maximum processing time per audio stageSTACK_FREE(1): lowest free stack per stageHEAP_FREE(2): current and lowest free heap per tile
- Added the FPH QSPI flash extension.
- Hardening:
- Zero-length reads and payloads longer than 253 bytes are rejected with
CONTROL_DATA_LENGTH_ERROR. A zero-length read used to halt the firmware. - Failed reads never report success, and their payload is zeroed.
DFU_DNLOADrejects bad embedded lengths withSERVICER_WRONG_PAYLOADinstead of asserting.
- Zero-length reads and payloads longer than 253 bytes are rejected with
Performance and real-time fixes
- LED ring updates can no longer run on the RTOS-tick, mic or I2S cores. Interrupts are off for ~0.75 ms per update, down from ~1.65 ms.
- 16↔48 kHz resampling uses proper filters instead of sample repetition, which removes images above 8 kHz. It runs on the VPU in about half the cycles.
- Speaker playback no longer stalls when the AEC falls behind. The playback path is one task, which saves up to ~30 ms of latency.
- I2S fixes:
- Underruns now output silence instead of repeating the last sample.
- The receive filter now uses the receive filter's own context.
- Pipeline output goes to the I2S tile as plain intertile messages instead of RPC.
- The mic buffer holds 3 frames, so a late stage no longer drops a mic frame and shifts the mics against the AEC reference.
- The watchdog is fed only while audio frames keep flowing. FreeRTOS stack-overflow checking is enabled.
- Less work per frame:
- Tile-to-tile traffic dropped from 5,784 to 2,004 bytes per frame.
- DOA FFTs run on the VPU.
- AEC, IC, NS and AGC process frames in place.
- The tile 0 voice libraries build with
-O2. - Device-control servicers run below the audio pipeline's priority.
- Free RAM: tile 1 has ~40 KB free (was ~22 KB), and tile 0 gained ~10 KB.
Experimental: aec4 variant
- Released as
satellite1_xmos_aec4[-<tag>].factory.bin. - It runs the AEC on all four mics against a mono (L+R)/2 speaker reference, and runs the mic front end after the AEC. As a result, switching mics or steering the beam doesn't make the AEC re-converge.
- In xsim it reaches ~60 dB ERLE. It has not been validated on hardware.
- With stereo music on "Left only" or "Right only" speaker modes, or on line-out, the mono reference only partly matches.
Release assets
| Asset | Contents |
|---|---|
satellite1_xmos.factory.bin / .md5 and satellite1_xmos-v2.0.0.factory.bin / .md5 |
Default firmware (fixed_delay) |
satellite1_xmos_aec4.factory.bin / .md5 and satellite1_xmos_aec4-v2.0.0.factory.bin / .md5 |
Experimental aec4 firmware |
satellite_firmware_apps-v2.0.0.zip |
All build outputs (.xe, factory and upgrade images) |
satellite1-xmos-firmware_2.0.0-1_all.deb |
Debian package with the default firmware |
To pin a release or variant in ESPHome, set the xmos_fw_version substitution. See docs/versioning.md.
Build and CI
- Releases are built when a GitHub release is published. The tag becomes the firmware version, and the build fails if the two don't match.
- The build Python is now 3.12. Recreate local venvs with
python3.12 -m venv .venv && pip install -r requirements.txt. xmos-ai-tools1.4.4. When its version changes, CMake regenerates the VNR model.- The firmware is also packaged as a Debian package.
- New
tools/build_local.shfor local builds on macOS and Linux. - New host tests cover the mic front end, DOA, beamforming, steering, wake word handling, HPF, VNR hold and versioning.
Known limitations
- The
aec4variant and beam mode have not been validated on hardware. - AEC echo cancellation and double-talk with the post-AEC gain have not been measured on hardware.
- ...
v2.0.0-beta.2
This release lets the host ask which firmware variant is running, and attaches the release images a second time with the tag in their file name, so ESPHome configs can pin a release and a variant. The audio pipeline is the same as in v2.0.0-alpha.7. These notes cover everything since alpha.7, including v2.0.0-beta.1.
DFU / device control
- New read command DFU_CONTROLLER_SERVICER_RESID_DFU_GETVARIANT (resid 92, 1 byte). All variants of a release share one version string, so until now the host had no way to tell them apart.
| Value | Variant | Release asset |
|---|---|---|
| 0 | fixed_delay | satellite1_xmos-.factory.bin |
| 1 | bypass | not released |
| 2 | aec4 | satellite1_xmos_aec4-.factory.bin |
- The values are fixed and new variants take the next free number. Firmware built before this command (alpha.7 and beta.1 included) answers CONTROL_BAD_COMMAND, and hosts should treat that answer as fixed_delay.
- docs/device-control-spi-protocol.md now also documents the payload of the version command: [major, minor, patch, pre_release, counter], where pre_release is 0 none, 1 alpha, 2 beta, 3 rc, 4 dev.
Release assets
- Each factory image and its .md5 are attached twice: under the plain name, and again with - appended, e.g. satellite1_xmos-v2.0.0-beta.2.factory.bin and satellite1_xmos_aec4-v2.0.0-beta.2.factory.bin. To change release or variant in ESPHome, change the xmos_fw_version substitution. docs/versioning.md has an example. The plain names stay, because the upstream ESPHome config downloads them.
- Renamed: satellite_firmware_apps.zip is now satellite_firmware_apps-.zip, attached once only. The Documentation repo runs unzip *.zip, which fails when a release holds two zips. Scripts that download the zip by its old name must be updated.
- The release workflow fails if the built firmware version does not match the release tag.
Build
- xmos-ai-tools is bumped from 1.4.2 to 1.4.4.
- The build Python is now 3.12, up from 3.10. xmos-ai-tools needs numpy<2.0, which has no wheels for Python versions newer than 3.12. Update local venvs: python3.12 -m venv .venv && pip install -r requirements.txt.
- When the installed xmos-ai-tools version changes, CMake deletes the generated VNR model source so it is built again. Before, the stale model failed to compile against the new runtime until you deleted it by hand. Configure stops with an error if xmos-ai-tools is missing.
- CI rebuilds its venv when the Python version or requirements.txt changes. When python3.12 is not installed (the Debian 11 xcore_builder image), CI bootstraps it with uv.
- versioning.py: set_to_dev() returned None for a version that was already a dev version, which broke callers that chain on it. It now always returns the version object. Tests cover this.
Compatibility
- The protocol stays at 0x11. The new command is additive, and no existing command or payload changed.
- Hosts that do not send GETVARIANT see no change.
v2.0.0-beta.1
What's Changed
- Attach release firmware with the release tag in the asset name by @benchmate[bot] in #9
New Contributors
- @benchmate[bot] made their first contribution in #9
Full Changelog: v2.0.0-alpha.7...v2.0.0-beta.1
v2.0.0-alpha.7
Summary
This release hardens SPI device control and DFU against malformed requests, tunes the DOA band, and adds an experimental aec4 firmware build. The release binaries are still the fixed_delay build, and its audio pipeline is unchanged apart from the DOA band.
SPI device control
- Write status is now real. After a write, the status-only frame used to report only whether the resource exists, so the host saw success even when the servicer rejected the value or the payload was cut short. It now carries the command's actual result, e.g.
SERVICER_WRONG_PAYLOAD(67) for an out-of-range gain orCONTROL_DATA_LENGTH_ERROR(3) for a truncated write. - Zero-length reads no longer halt the firmware. A read with
payload_len0 of a resource on the other tile (e.g.[230, 0x80, 0], the audio servicer) hit an assertion. Such reads are now rejected withCONTROL_DATA_LENGTH_ERROR, as are payload lengths above the documented 253 bytes. - Failed reads are predictable. A failed read never reports
CONTROL_SUCCESSin its status byte, and its payload is zeroed instead of holding stale buffer or uninitialized heap contents.
DFU
DFU_CONTROLLER_SERVICER_RESID_DFU_DNLOADrejects an embedded length above 128 bytes, or longer than the data sent, withSERVICER_WRONG_PAYLOAD. Before, it halted the firmware on an assertion.
DOA
- The DOA band's upper edge moved from 3500 Hz to 3000 Hz. The opposite mics are 7.1 cm apart, so the highest bins alias, and in reverberant rooms they blurred the estimate more than they sharpened it.
- In simulated rooms (RT60 up to 0.6 s), the 90th-percentile direction error in a live room dropped from 11–13° to 8–10°. Dry rooms are unchanged.
- The DOA also uses 8 fewer frequency bins per estimate (44 instead of 52), so it costs slightly less CPU.
Experimental: aec4 build (not in the release assets)
- A new local build target,
satellite1_firmware_aec4, runs the AEC on all four mics against a mono (L+R)/2 speaker reference. That matches the TAS2780's default "Mono (Left + Right)" mode. - The mic front end (mic pairs, average, auto-pair, beam) runs after the AEC, so steering the beam or switching mics no longer makes the AEC re-converge.
- It uses its own copies of lib_aec/lib_ic, built for 4 mics × 1 reference. The fwk_voice submodule is untouched.
- Measured in xsim and from the build:
- AEC time: 7.97 ms per 15 ms frame, vs 7.52 ms for
fixed_delay. - Tile 1 RAM: 507,420 B used, vs 499,764 B.
- AEC time: 7.97 ms per 15 ms frame, vs 7.52 ms for
- Not yet tested on hardware.
- With the speaker set to "Left only" or "Right only", or on the stereo line-out, the mono reference only partly matches stereo music. TTS and announcements are mono and are unaffected.
Build
tools/ci/build_firmware.shnow exits with an error when its input list is missing, instead of reporting success.
Compatibility
- The protocol stays at
0x11.docs/device-control-spi-protocol.mddocuments the new status codes and length limits. - Hosts that send valid requests see no change. Satellite1-ESPHome never reads the write status and always sends read lengths of at least 1.
v2.0.0-alpha.6
Summary
This implements the XMOS side of the wake word research. The ESPHome side is remcom/Satellite1-ESPHome#74.
Wake word steering (§5.1, beam mode and AUTO_PAIR)
- New command
AUDIO_SERVICER_CMD_WAKE_EVENT(9). The host writes1right after a wake word and0when the conversation ends. - The front end keeps the last ~1.5 s of DOA results (80 entries, 960 B). On a wake word it steers the beam within one frame, crossfaded and without the 0.5 s stable time or the 3 s dwell. In AUTO_PAIR it picks the pair facing the wake word.
- The direction is the confidence-weighted mean of the largest group of DOA results within 30°. That group must hold at least 25 % of the window's weight and needs at least 5 results.
- Groups are ranked down by up to half according to where idle speech usually comes from: a decaying 36-bin histogram over about 30 s of located speech (the report's "TV louder than user" refinement). A wake word said while a TV talks therefore wins with about as many located frames as the TV had.
- While a conversation is active, speech does not re-steer, for at most 60 s. Each new wake word restarts that limit, also when the host never sent
0in between. - Reading
WAKE_EVENTreturns1only while the steering is actually held. It returns0after a0was written, or once the 60 s ran out. - New command
AUDIO_SERVICER_CMD_STEER_POLICY(8):0follow speech: the default, and the same behaviour as before when no wake events arrive.1wake word only: a TV can no longer pull the beam.2fixed.
IC onset protection (§4.1)
- New command
AUDIO_SERVICER_CMD_IC_FAST_HOLD(6), default on. - The IC hold decision uses a VNR estimate with a fast attack (α 0.5) and a slow release (α 0.97, as before). From noise into speech the IC holds after 1–2 frames instead of 23–30.
- fwk_voice applies its filter leakage (0.996 per frame) above the same VNR's 0.75 threshold. Fed the fast estimate directly, the leak would start ~50 frames earlier per utterance and wear down the learned filter.
vnr_hold_adapt_vnr()keeps the fast estimate at 0.75 until the fwk_voice EMA is above 0.75 as well. The hold is fast; the leakage keeps its old timing. - It reuses the same
vnr_extract_features/vnr_inferencecalls asic_calc_vnr_pred(), so there is no extra CPU. The AGC flag still uses the fwk_voice EMA. - The optional OR with the DOA energy detector was not implemented: it would also hold the IC on TV and music onsets.
Right channel tap (§3.2)
- New command
AUDIO_SERVICER_CMD_CH1_TAP(5):0AEC+IC+NS: the default, same as before.1AEC+IC, before the NS.2AEC only.
- A build that cannot produce a tap rejects it with
SERVICER_WRONG_PAYLOADinstead of outputting stale frame memory. Taps1and2need the IC stage, and1also needs the IC output stored. If the selected tap is unavailable, the output falls back to0. - Tile 0 settings travel in a new
frame_data_t.t0_ctrlword, because the servicer runs on tile 1.
High-pass (§3.3)
- New command
AUDIO_SERVICER_CMD_HPF(7), default on. - A 2nd-order 100 Hz Butterworth high-pass on both pipeline channels, before the AEC (DF1, Q28 coefficients, int64 accumulators, saturating).
Docs: README and docs/device-control-spi-protocol.md cover the five new commands. They are additive; older hosts never send them.
v2.0.0-alpha.5
New: DOA-steered beam mic mode
Mic mode 4 (MIC_MODE_BEAM) uses all four microphones. Before, every mode picked or averaged two of them. The mode turns the AEC/IC stages into a generalized sidelobe canceller:
- Channel 0 is a beam aimed at the talker: all four mics time-aligned towards the DOA and summed, so the talker passes through undistorted.
- Channel 1 is a blocking beam that cancels the talker and hears the rest of the room. The IC uses it as its noise reference, so it removes noise without a copy of the talker's speech to cancel.
How the beams steer:
- When you enter the mode, the beams point at the last valid DOA straight away.
- After that, they re-steer to the mean DOA once the talker has been more than 15° off them for ~0.5 s of speech, at most every ~3 s.
- They re-steer only if those DOA results agree. Two talkers taking turns leave the beams where they are.
- Each re-steer makes the AEC and IC re-adapt briefly, as a pair switch does.
Known limits: the blocking beam is weak below ~500 Hz and has gaps at some directions above ~2.5 kHz.
The default mic mode is unchanged (0, East/West pair). Beam mode is opt-in.
SPI protocol additions
All additions are additive. Existing commands behave as before.
| Command | ID | Access | Payload |
|---|---|---|---|
AUDIO_SERVICER_CMD_MIC_MODE |
1 |
Read/write | Now also accepts 4 (beam) |
AUDIO_SERVICER_CMD_BEAM (new) |
4 |
Read | 2 bytes: steering azimuth as little-endian uint16 (0..359, same convention as DOA), or 0xFFFF when the mic mode is not 4 |
In beam mode, MIC_PAIR reports 0x0F for both channels. Writes to BEAM are rejected with CONTROL_BAD_COMMAND.
Fixes
- I2S transmit underrun: on an underrun, the output repeated the last sample. It now outputs silence.
- I2S receive path: the receive filter was called with the send filter's context. The receive buffer also advanced by the number of input samples instead of the number of words the filter wrote.
- Mic frame drops: the mic buffer holds 3 frames instead of 2. Before, a stage 0 that ran late dropped a whole mic frame, which shifted the mics against the AEC reference.
Performance
- 16↔48 kHz resampling on the VPU: speaker output upsampling and reference downsampling use the same 72-tap lib_src voice filter (same response and delay) in about half the cycles. Output matches lib_src to within ~20 LSB.
- Beamformer: fractional-delay filtering uses the VPU (
vect_s32_dot). - In-place processing: AEC, IC, NS and AGC process their frames in place. The reference energy is computed once and reused.
-O2for the tile 0 voice libraries: IC/VNR, NS and AGC are 1.5–2.2% faster each, ~115 µs per frame in all (measured in xsim).SATELLITE1_VOICE_LIBS_O2now defaults toONand no longer covers the AEC, which gained only 0.1% and runs on tile 1, where RAM is short.- No I2S RPC: pipeline output reaches the I2S tile as plain intertile messages. The RPC allocated the ~5.8 KB frame on the heap of both tiles for every frame and sent a response message.
- Device control priority: the device control servicers now run below the audio pipeline. A burst of SPI commands or a DFU write can no longer take a core from a pipeline stage.
Other changes
- The periodic heap usage log line is gone. Read heap usage with the stats servicer (
STATS_SERVICER_CMD_HEAP_FREE). - New
tools/build_local.shbuilds firmware variants and flash images locally on macOS and Linux. It sets up XTC and a virtualenv, and lets you choose the output directory. - New host tests cover beam response, steering, mode transitions, crossfades, blocking-beam frequency response and the reference energy helper.
Upgrading
Host integrations need no changes. Settings are still not persisted. Mic mode returns to 0 on reset.
How to check
- Write
4toAUDIO_SERVICER_CMD_MIC_MODE. - Read
AUDIO_SERVICER_CMD_BEAM. It should show your direction, matching theDOAreading. - Move about 90° around the device and keep talking. After ~0.5 s of speech,
BEAMshould follow. It changes at most every ~3 s. - Set the mode back to
0.BEAMshould read0xFFFF.
v2.0.0-alpha.4
Fix: microphone pin mapping
The Satellite1 board config had the microphones on PDM pin 0 and pin 1 swapped. Every mic was labelled as the one opposite it, so every direction the firmware reported was off by 180°.
What changes for you
| Before | Now | |
|---|---|---|
DOA azimuth (AUDIO_SERVICER_CMD_DOA) |
A talker at the North mic read ~180° | A talker at the North mic reads ~0°, at East ~90° |
| LED ring DOA indicator | Lit the LED opposite the talker | Lights the LED facing the talker |
Active mic masks (MIC_PAIR) |
Named the opposite mics | Name the mics that are actually in use |
MIC_MODE_AUTO_PAIR and MIC_MODE_AVERAGE already chose the right mics, because the labels were wrong in the same way everywhere. They behave as before. In the default MIC_MODE_PAIR_EW, the two channels going into the processing pipeline trade places.
Action for host integrations
If your host code adds 180° to the DOA reading, or reverses the mic masks, to make up for this bug, remove that correction when you update to this release.
Details
MIC_MAPPINGinbsp_config/SATELLITE1/SATELLITE1.cmakechanged from"0, 1, 4, 5"to"1, 0, 5, 4". The order is still North, South, East, West.- The SPI protocol and the LED ring settings are unchanged.
How to check
Enable the DOA indicator and talk from each side of the device. The lit LED should point at you, and the DOA reading should be about 0° at the North mic and about 90° at the East mic.
v2.0.0-alpha.3
Performance and real-time fixes
This release frees CPU time and RAM on both XMOS tiles, removes several causes of audio glitches, and adds diagnostics for checking how much processing headroom the audio pipeline has left.
Fixes
- LED ring updates no longer risk dropping microphone or I2S samples. Writing a frame to the LED ring turns off interrupts for the duration of the frame. The LED task can no longer run on the cores that handle the RTOS tick, the microphone or I2S. Interrupts are also off for much less time per update: about 0.75 ms, down from about 1.65 ms.
- Cleaner audio to the host. The 16 kHz → 48 kHz output conversion now uses a proper filter instead of repeating each sample three times. This removes images above 8 kHz and the loss of level at the top of the voice band.
- Speaker playback no longer stalls when the echo canceller falls behind. If the AEC is late, the oldest speaker reference frame is dropped instead of holding up the DAC.
- The watchdog now catches a stalled audio pipeline. It is only fed while audio frames keep coming out of the pipeline, so a hang on either tile resets the device.
- Stack overflows are detected. FreeRTOS stack checking is enabled, and an overflow now halts the device with a report instead of silently corrupting memory.
Performance
- Faster direction-of-arrival (DOA) estimation. The FFTs now run on the XMOS vector unit, and only the correlation lags that are actually needed are computed, replacing a full 512-point inverse FFT. DOA accuracy is unchanged in the host tests.
- Less playback latency. The speaker path runs as a single task instead of a two-stage pipeline, saving up to ~30 ms of delay and a task on tile 1.
- About a third of the tile-to-tile traffic per audio frame. Unused data is no longer sent from tile 1 to tile 0: frames are 2,004 bytes instead of 5,784.
- Smaller per-frame overhead. Energy detection and mic gain run on the vector unit, the hot DSP files build with
-O2, and a full-framememsetper frame is gone. - More free RAM. Tile 1 now has ~40 KB free instead of ~22 KB, and tile 0 has ~10 KB more.
New: stats servicer (resource 250)
A new read-only device-control resource for checking the real-time headroom on a running device:
| Command | ID | Returns |
|---|---|---|
STATS_SERVICER_CMD_STAGE_TIMES |
0 |
Last and maximum processing time per audio stage, in µs (the maximum restarts on each read) |
STATS_SERVICER_CMD_STACK_FREE |
1 |
Lowest free stack per audio stage, in words |
STATS_SERVICER_CMD_HEAP_FREE |
2 |
Current and lowest free heap on tile 0 and tile 1 |
Seven stages are reported: mic front end + DOA, AEC, speaker reference resampling, IC/VNR, NS, AGC and output resampling. A frame is 15 ms, so any stage above 15,000 µs cannot keep up. See docs/device-control-spi-protocol.md for the payload layout.
Changes for host integrations
- The device now waits for five servicers to register at startup instead of four, because the stats servicer was added.
- Mic gain now clips symmetrically: negative peaks saturate at −2147483647 instead of −2147483648.
- The SPI protocol version stays at
0x11; all protocol changes are additive.
Build
- New CMake option
SATELLITE1_VOICE_LIBS_O2(defaultOFF) builds the AEC, IC, NS, AGC and VNR libraries with-O2. It costs about 3.4 KB on tile 1 and 0.9 KB on tile 0. Use the stats servicer's stage times to check whether it pays off before enabling it. - The host test suite now also compiles
lib_xcore_math's portable reference code, so the vector-unit DOA path is tested on the build machine.