Skip to content

Remove deprecated assignment to .shape - #641

Merged
mgeier merged 3 commits into
spatialaudio:masterfrom
mgeier:shape-deprecation
Aug 29, 2026
Merged

mgeier merged 3 commits into
spatialaudio:masterfrom
mgeier:shape-deprecation

Conversation

@mgeier

@mgeier mgeier commented Aug 22, 2026

Copy link
Copy Markdown
Member

Fixes #638.

I intentionally didn't use np.reshape(), even though it was suggested in the NumPy warning message. The function call is much slower than the eponymous method call, but both of them change the returned array's .base attribute, which then points to a temporary array. I would like it to, as it has done before, point directly to the CFFI backend buffer.

@mgeier mgeier mentioned this pull request Aug 22, 2026
@mgeier
mgeier merged commit 626fcb0 into spatialaudio:master Aug 29, 2026
15 checks passed
@mgeier
mgeier deleted the shape-deprecation branch August 29, 2026 06:36
thervier added a commit to funwithagents/wica-interaction that referenced this pull request Nov 13, 2026
…ells where the echo moved (#14)

* Docs: AEC3 all but ignores stream_delay_ms; stop telling users to tune it

AEC3 estimates the echo's delay itself and uses an external one only with
delay.use_external_delay_estimator (off, and not exposed by the binding): replaying the same audio
with the hint at 0 to 500 ms changes the residual by 0.1 dB. The spec no longer says the estimator
is "seeded" by it, and the guides no longer say to raise it when the agent hears itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tests: ignore sounddevice's NumPy 2.5 deprecation, raised in every audio callback

sounddevice 0.5.6 assigns `data.shape` in each callback. A plain run ignores the warning, but
pytest records each one, ~17k per end-to-end conversation, and processes them at the end of each
test: the process froze ~300 ms while the app's audio ran, its mic stream then stayed ~85 ms
behind for the rest of the run, and the echo canceller leaked while it relearned (found with a
stall probe in CI). Filtered for that message and module only; fixed upstream
(spatialaudio/python-sounddevice#641), to drop once a release after 0.5.6 is locked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* CI: upload the computer's end-to-end evidence on every run

Its audio.npz recordings are what the echo canceller is measured on, and the echo check no longer
fails, so a failure-only upload left nothing to measure. Kept 30 days.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* e2e: the room holds its echo's delay; the echo path logged as evidence

The room recorded the app's speaker on one stream and played it into the cable on another; with
their clocks 250-400 ppm apart its echo crept 20-30 ms per conversation, which a laptop's does not
and the canceller pays for. It now holds the delay from recording to playback (PortAudio's ADC and
DAC times): one resampled sample per block against the drift, the whole excess cut after a late
block. Offline, at 0, +-400 and +1000 ppm with a 90 ms late burst, it holds within 0.1 ms (the old
room: 50 -> 103 ms over 40 s); in CI the delay seen by the app stays flat.

The evidence now also tells where a change in the echo's delay comes from: the room's log of its
echo path (room.npz) and each callback of the app's own two audio streams (in audio.npz: latency,
underflow and overflow flags). The echo recorder is entered before the build, which opens the
voice's output stream.

specs/e2e.md: Implemented -> Updated -> Implemented, with its plan Done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NumPy DeprecationWarning

1 participant