From d4e3738d05a8dcde8345da6dc3a6b36748e4d967 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 19 May 2026 11:00:55 +0100 Subject: [PATCH] Quarantine spatial audio publisher --- docs/aquarium-spatial-audio.md | 2 +- docs/implementation-plan.md | 6 ++++-- .../diagnostics/spatial_audio.py | 4 ++-- localcast/diagnostics/visual_producer.py | 2 +- notes/current-system-map.md | 4 ++-- notes/fresh-workspace-handoff.md | 2 ++ state/evidence.jsonl | 1 + state/map.yaml | 10 +++++----- 8 files changed, 18 insertions(+), 13 deletions(-) rename scripts/stream_spatial_audio.py => localcast/diagnostics/spatial_audio.py (97%) diff --git a/docs/aquarium-spatial-audio.md b/docs/aquarium-spatial-audio.md index 061ebe3..cd1067d 100644 --- a/docs/aquarium-spatial-audio.md +++ b/docs/aquarium-spatial-audio.md @@ -63,7 +63,7 @@ Mic-field document type: AmbiX replay smoke command: ```powershell -.\.venv\Scripts\python.exe .\scripts\stream_spatial_audio.py --input .\calibration\runs\audio-full-sync-20260518-165751\field-foa-ambix.wav --loop --duration 5 --smoke-readback +.\.venv\Scripts\python.exe -m localcast.diagnostics.spatial_audio --input .\calibration\runs\audio-full-sync-20260518-165751\field-foa-ambix.wav --loop --duration 5 --smoke-readback ``` Faust mic-field replay smoke command: diff --git a/docs/implementation-plan.md b/docs/implementation-plan.md index 20e970e..9814549 100644 --- a/docs/implementation-plan.md +++ b/docs/implementation-plan.md @@ -106,8 +106,10 @@ shape removes independent per-kind storage from the live foundation. - The scripts assume Windows sender and OBS receiver on the same LAN. - The Python visual producer is a diagnostic/migration fossil only. The OpenGL Spout sink has been deleted. -- Python audio publishers are diagnostic fossils only. The live PowerShell - launchers for phase-field and Faust mic-field publication have been deleted. +- Python audio publishers are diagnostic fossils only. The AmbiX, phase-field, + live-local-capture, and Faust mic-field publisher modules live under + `localcast.diagnostics.*`; the live PowerShell launchers for phase-field and + Faust mic-field publication have been deleted. ## Next diff --git a/scripts/stream_spatial_audio.py b/localcast/diagnostics/spatial_audio.py similarity index 97% rename from scripts/stream_spatial_audio.py rename to localcast/diagnostics/spatial_audio.py index aee1d7b..bc334e7 100644 --- a/scripts/stream_spatial_audio.py +++ b/localcast/diagnostics/spatial_audio.py @@ -7,7 +7,7 @@ import numpy as np from scipy.io import wavfile -ROOT = Path(__file__).resolve().parents[1] +ROOT = Path(__file__).resolve().parents[2] if str(ROOT) not in sys.path: sys.path.insert(0, str(ROOT)) @@ -64,7 +64,7 @@ def source_block(samples: np.ndarray | None, sample_rate: int, start_sample: int def main() -> None: - parser = argparse.ArgumentParser(description="Publish live AmbiX spatial audio blocks into typed CultCache state for Aquarium/Faust.") + parser = argparse.ArgumentParser(description="Diagnostic replay of AmbiX spatial audio blocks into typed CultCache state.") parser.add_argument("--input", type=Path, default=ROOT / "calibration" / "runs" / "audio-full-sync-20260518-165751" / "field-foa-ambix.wav") parser.add_argument("--cache", type=Path, default=ROOT / "calibration" / "runs" / "audio-state.msgpack") parser.add_argument("--status-cache", type=Path, default=ROOT / "calibration" / "runs" / "audio-stream-status.msgpack") diff --git a/localcast/diagnostics/visual_producer.py b/localcast/diagnostics/visual_producer.py index 1ce04a1..b7cdcd2 100644 --- a/localcast/diagnostics/visual_producer.py +++ b/localcast/diagnostics/visual_producer.py @@ -1130,7 +1130,7 @@ def leap_channel_motion_points( def main() -> None: - parser = argparse.ArgumentParser(description="Write live sensor-fusion render frames into typed CultCache state.") + parser = argparse.ArgumentParser(description="Diagnostic replay of sensor-fusion render frames into typed CultCache state.") parser.add_argument("--cache", default=str(ROOT / "calibration" / "runs" / "visual-state.msgpack")) parser.add_argument("--fps", type=float, default=30.0) parser.add_argument("--points", type=int, default=256) diff --git a/notes/current-system-map.md b/notes/current-system-map.md index e1edf5a..45c382c 100644 --- a/notes/current-system-map.md +++ b/notes/current-system-map.md @@ -113,8 +113,8 @@ Ownership: - `audio_field/` owns unit-testable buffering, bounded-latency convergence, injectable port protocols, and pipeline orchestration. - Runtime sync owns per-block chirplet observations from known speaker output and updates delay/SRO/phase estimates with confidence gates before alignment. - `audio_field.phase_meaning` owns extracting usable meaning from internal phase/chirplet evidence. The live cache publishes delay correction, coherence, confidence, distance-equivalent delta, reference-bleed/suppression estimates, correction energy, and active-probe need; raw phase bands stay inside the estimator. -- `localcast.diagnostics.audio_live_field`, `localcast.diagnostics.audio_phase_field`, and `localcast.diagnostics.faust_mic_field` preserve the old Python audio publisher experiments as diagnostics only. Production mic, loopback, and phase ingest belongs in native capture workers that append typed sample handles through `LocalcastProducer`. -- `audio-phase-field-status.json` declares the phase runtime mode. Current deadline mode is `live-local-capture` with closed-loop probe capture when Scarlett loopback is available. +- `localcast.diagnostics.audio_live_field`, `localcast.diagnostics.audio_phase_field`, `localcast.diagnostics.faust_mic_field`, and `localcast.diagnostics.spatial_audio` preserve the old Python audio publisher experiments as diagnostics only. Production mic, loopback, phase, stem, and spatial-bed ingest belongs in native/Faust workers that append typed sample handles through `LocalcastProducer`. +- `audio-phase-field-status.json` is a diagnostic status export from the replay/experiment modules. The production phase runtime must report through typed CultNet/native status, not by making this JSON file the lifecycle authority. - Active probe optimization owns extra chirplet emission when confidence drops, bounded by level/spacing/audibility budget. `audio_field.active_probe` is the runtime join that converts phase-field confidence into emitted chirplet WAVs/manifests and playback. Probe WAVs rotate through fixed slots and the manifest rotates at a byte cap; calibration may be dense, but artifacts must stay bounded. - The camera/sensor-fusion pipeline may publish world poses later; it does not own audio clocks or channel timing. - OBS may ingest rendered output later; it is not the authority for the Ambisonic field. diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index e913616..ddd5e15 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -51,6 +51,8 @@ Get-Content .\state\evidence.jsonl -Tail 8 and reusable mic-profile/probe-band helpers now live in `audio_field`. Production audio ingest must use native capture workers and `LocalcastProducer`. +- The AmbiX spatial-audio Python publisher is also quarantined as + `localcast.diagnostics.spatial_audio`. - Neighbor sender is deployed at `C:\Meta\LocalCastBridge` on `192.168.1.84`. - Madman's desktop has `Start LocalCast Sender.cmd` and `Stop LocalCast Sender.cmd`. - Receiver OBS scene collection has `Neighbor PC - Video`, `Neighbor PC - Focusrite`, and `Neighbor PC - System Audio` Media Sources added. diff --git a/state/evidence.jsonl b/state/evidence.jsonl index 1d02423..aaeab61 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -71,3 +71,4 @@ {"ts": "2026-05-19T11:55:00+01:00", "type": "implementation", "status": "ok", "note": "Aquarium-Engine LocalCastRuntime now consumes an injected ILocalCastVisualFrameSource instead of directly owning LocalCastVisualStateReader. Commit 8798908 adds the source seam and tests; Aquarium.LocalCast.Tests passed 11 tests and the branch was pushed."} {"ts": "2026-05-19T12:08:00+01:00", "type": "implementation", "status": "ok", "note": "Aquarium-Engine commit 687845c adds LocalCastNativeVisualFrameSource over ILocalCastNativeRuntime. It reads the latest live render-packet handle from the native runtime and uses an injected payload decoder to produce LocalCastVisualFrame, keeping reservoir traversal separate from payload ownership; Aquarium.LocalCast.Tests passed 13 tests and the branch was pushed."} {"ts": "2026-05-19T09:57:12+00:00", "type": "implementation", "status": "ok", "note": "Python audio live launchers removed: phase/live/Faust publisher scripts moved under localcast.diagnostics, reusable mic profile and probe-band helpers moved into audio_field, and docs/state now name native LocalcastProducer capture workers as the production audio ingest owner."} +{"ts": "2026-05-19T10:00:32+00:00", "type": "implementation", "status": "ok", "note": "AmbiX spatial-audio Python publisher moved from scripts into localcast.diagnostics.spatial_audio; docs and handoff now treat it as replay smoke-test code while live spatial/stem production remains native/Faust through LocalcastProducer."} diff --git a/state/map.yaml b/state/map.yaml index 4bd47e5..196e2ae 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -169,11 +169,11 @@ research: closes the next loop by feeding that confidence state into ActiveProbeOptimizer and emitting bounded chirplet WAVs/manifests, with optional playback. Probe artifacts rotate through fixed slots and the - manifest rotates at a byte cap. The old Python phase/live/Faust audio - publishers now live under `localcast.diagnostics.*` and are diagnostic - replay or experiment paths only. Production mic, loopback, and phase - ingest belongs in native capture workers that append typed sample handles - through `LocalcastProducer`. + manifest rotates at a byte cap. The old Python AmbiX, phase, live-local, + and Faust audio publishers now live under `localcast.diagnostics.*` and + are diagnostic replay or experiment paths only. Production mic, loopback, + phase, stem, and spatial-bed ingest belongs in native/Faust workers that + append typed sample handles through `LocalcastProducer`. This is learned audio-field state, not a phase display. faust_voice_separation: summary: docs/aquarium-spatial-audio.md