Skip to content

v2.0.1

Choose a tag to compare

@remcom remcom released this 27 Nov 10:43
· 9 commits to develop since this release
91c2184

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_MIX to 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_delay is 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_HPF is 0. It doesn't touch the streamed audio, the GCC-PHAT inputs, the beam timing or the playback gating.
  • Turning AUDIO_SERVICER_CMD_HPF back 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_voice harness. 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 aec4 AEC stage with the DOA after it hasn't been measured on hardware. Tile 1 RAM in aec4 is ~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