@trillboards/edge-sdk 0.2.49 → 0.2.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -0
- package/deploy/macos/README.md +18 -3
- package/deploy/macos/apply-update.sh +225 -0
- package/deploy/macos/build-macos-pkg.sh +10 -8
- package/deploy/macos/scripts/postinstall +13 -3
- package/dist/AudioOnsetDetector.d.ts +211 -0
- package/dist/AudioOnsetDetector.d.ts.map +1 -0
- package/dist/AudioOnsetDetector.js +286 -0
- package/dist/AudioOnsetDetector.js.map +1 -0
- package/dist/CloudSensingManager.d.ts +49 -0
- package/dist/CloudSensingManager.d.ts.map +1 -1
- package/dist/CloudSensingManager.js +84 -1
- package/dist/CloudSensingManager.js.map +1 -1
- package/dist/EdgeAgent.d.ts.map +1 -1
- package/dist/EdgeAgent.js +20 -2
- package/dist/EdgeAgent.js.map +1 -1
- package/dist/LiteRtVlmProvider.d.ts +54 -0
- package/dist/LiteRtVlmProvider.d.ts.map +1 -1
- package/dist/LiteRtVlmProvider.js +132 -0
- package/dist/LiteRtVlmProvider.js.map +1 -1
- package/dist/SceneChangeDetector.d.ts +27 -1
- package/dist/SceneChangeDetector.d.ts.map +1 -1
- package/dist/SceneChangeDetector.js +42 -0
- package/dist/SceneChangeDetector.js.map +1 -1
- package/dist/attachAudioOnset.d.ts +87 -0
- package/dist/attachAudioOnset.d.ts.map +1 -0
- package/dist/attachAudioOnset.js +87 -0
- package/dist/attachAudioOnset.js.map +1 -0
- package/dist/config.d.ts +46 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/connectorUpdate.d.ts +23 -16
- package/dist/connectorUpdate.d.ts.map +1 -1
- package/dist/connectorUpdate.js +37 -10
- package/dist/connectorUpdate.js.map +1 -1
- package/dist/connectorUpdateApply.d.ts +3 -0
- package/dist/connectorUpdateApply.d.ts.map +1 -1
- package/dist/connectorUpdateApply.js +3 -0
- package/dist/connectorUpdateApply.js.map +1 -1
- package/dist/connectorUpdateApplyMac.d.ts +50 -0
- package/dist/connectorUpdateApplyMac.d.ts.map +1 -0
- package/dist/connectorUpdateApplyMac.js +166 -0
- package/dist/connectorUpdateApplyMac.js.map +1 -0
- package/dist/diagnose.d.ts +1 -1
- package/dist/diagnose.js +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/dist/sensingRunMode.d.ts.map +1 -1
- package/dist/sensingRunMode.js +5 -0
- package/dist/sensingRunMode.js.map +1 -1
- package/dist/wavEncode.d.ts +29 -0
- package/dist/wavEncode.d.ts.map +1 -0
- package/dist/wavEncode.js +63 -0
- package/dist/wavEncode.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* AudioOnsetDetector — the connector's acoustic equivalent of
|
|
4
|
+
* `SceneChangeDetector`: the CHEAP stage that answers "did anything happen?"
|
|
5
|
+
* so the expensive stage (a VLM inference) is spent only when it might matter.
|
|
6
|
+
*
|
|
7
|
+
* ── WHY THIS IS DSP AND NOT A MODEL. The plan for this feature was to let
|
|
8
|
+
* Gemma 4 name acoustic events directly — it is already on the box, litert-lm
|
|
9
|
+
* accepts `input_audio`, and both encoders ship in our `.litertlm`, so no
|
|
10
|
+
* second model would be needed. That was MEASURED before it was built, and it
|
|
11
|
+
* does not hold. Against `gemma-4-E2B-it.litertlm,gpu`, mono 16 kHz WAV, real
|
|
12
|
+
* recordings, fresh serve, a speech control passing before and after every
|
|
13
|
+
* trial, on an Apple M4 Max — and run TWICE, on litert-lm 0.13.1 (the machine
|
|
14
|
+
* default) and again on an isolated 0.16.0 (the version both provisioners pin,
|
|
15
|
+
* so the one the fleet actually runs). The two agree clip-for-clip:
|
|
16
|
+
*
|
|
17
|
+
* | clip | open prompt ("describe every sound") | forced choice |
|
|
18
|
+
* |---------------|---------------------------------------|---------------|
|
|
19
|
+
* | glass break | "I cannot hear any audio" | `speech` |
|
|
20
|
+
* | glass break 2 | "you haven't provided an audio file" | `speech` |
|
|
21
|
+
* | door slam | "a click or a snap" | `speech` |
|
|
22
|
+
* | smoke alarm | "I cannot hear any audio" | `speech` |
|
|
23
|
+
* | siren | "possibly a scream or a siren" | `dog_barking` |
|
|
24
|
+
* | dog bark | "resemble a bird call" | `dog_barking` |
|
|
25
|
+
* | baby cry | "possibly laughter or screams" | `baby_crying` |
|
|
26
|
+
* | applause | "a single, loud, sharp sound" | `applause` |
|
|
27
|
+
*
|
|
28
|
+
* 2/8 open, 3/8 forced — the SAME 3/8 and the same per-clip labels on both
|
|
29
|
+
* runtimes, siren -> `dog_barking` included, so this is a property of the model
|
|
30
|
+
* and not of a runtime version. The three forced-choice hits are ALL animate
|
|
31
|
+
* vocalizations (dog, baby, human hands); every miss is mechanical, impact or
|
|
32
|
+
* tonal — and those four default to the label `speech` on audio containing no
|
|
33
|
+
* speech at all, because it is a speech model. The result is stable, not noisy:
|
|
34
|
+
* the smoke alarm returned a byte-identical refusal 16/16 times on a fresh
|
|
35
|
+
* serve, and the siren reads as `dog_barking` even as the FIRST request after a
|
|
36
|
+
* restart, so it is a real misclassification and not cross-request context
|
|
37
|
+
* bleed. The audio was genuinely INGESTED in every one of those trials — proven
|
|
38
|
+
* by a mixed control, `glass_then_speech.wav`, whose speech (which is SECOND in
|
|
39
|
+
* the file) transcribes exactly; a miss is therefore a capability result and
|
|
40
|
+
* not a silently dropped payload.
|
|
41
|
+
*
|
|
42
|
+
* The three events the product actually needs — a freezer door, breaking glass,
|
|
43
|
+
* a smoke alarm — are 0/3 in BOTH prompt regimes. So the gate is DSP, and Gemma
|
|
44
|
+
* keeps the half it is genuinely excellent at: it transcribed
|
|
45
|
+
* "There is a fire in the kitchen, everyone get out now" verbatim, 30/30, in
|
|
46
|
+
* 0.63–5.83 s. Speech goes to the model; "something happened" does not.
|
|
47
|
+
*
|
|
48
|
+
* TWO THINGS THOSE TIMINGS ARE NOT. (1) The DELEGATE is unconfirmed: the `,gpu`
|
|
49
|
+
* id was POSTed, but no engine trace was read back, and a warm mldrift cache
|
|
50
|
+
* does not re-emit the `Replacing N … (LITERT_WEBGPU)` line — so a latency range
|
|
51
|
+
* quoted here may span two delegates. The CAPABILITY result does not depend on
|
|
52
|
+
* that; the latencies are indicative only. (2) They are not this feature's
|
|
53
|
+
* running cost. The gate never calls the model at all — see below.
|
|
54
|
+
*
|
|
55
|
+
* ── COST, WHICH IS THE POINT OF PUTTING IT HERE. `litert-lm serve` is a SINGLE
|
|
56
|
+
* conversation and the connector's whole inference budget flows through it. A
|
|
57
|
+
* model-based gate would have spent that budget continuously, at 25 audio
|
|
58
|
+
* tokens per second of audio, on a machine already ceilinged in analyses/hour.
|
|
59
|
+
* This detector spends NONE of it: measured over 1 h of 16 kHz audio pushed in
|
|
60
|
+
* 100 ms blocks (36,000 blocks, one M4 Max core), it costs 50.5 ms of CPU
|
|
61
|
+
* total — 1.40 µs per block, 0.0014% of one core — and zero model tokens. The
|
|
62
|
+
* acoustic channel is therefore free with respect to the serial slot, and only
|
|
63
|
+
* `transcribeAudio` (opt-in, speech only) ever competes for it.
|
|
64
|
+
*
|
|
65
|
+
* ── WHAT IT DOES. Frame the PCM into short hops, take each hop's RMS in dBFS,
|
|
66
|
+
* hold a rolling estimate of the room's background level, and fire when a hop
|
|
67
|
+
* stands `thresholdDb` above that background for at least `minDurationMs`.
|
|
68
|
+
*
|
|
69
|
+
* ── THE ONE NON-OBVIOUS RULE, AND IT IS BORROWED ON PURPOSE. The background
|
|
70
|
+
* must NOT absorb the event that is currently firing. `SceneChangeDetector`
|
|
71
|
+
* carries the visual form of this rule from Frigate (rule 1 in its header: the
|
|
72
|
+
* background only moves after motion has persisted `BACKGROUND_UPDATE_AFTER_FRAMES`
|
|
73
|
+
* frames, otherwise a slowly-moving object is absorbed mid-walk and becomes
|
|
74
|
+
* invisible). The acoustic failure is the same shape and worse, because sound
|
|
75
|
+
* levels move much faster than pixels: a mean that updates every hop is dragged
|
|
76
|
+
* up by the very transient it is supposed to be measuring against, so a long
|
|
77
|
+
* event raises its own floor and the detector goes deaf partway through it.
|
|
78
|
+
* So the background updates freely while the room is quiet, and while a hop is
|
|
79
|
+
* above threshold it updates ONLY once that loudness has PERSISTED past
|
|
80
|
+
* `backgroundAbsorbAfterMs`. A 200 ms door slam never moves the floor; a
|
|
81
|
+
* genuinely louder room (a compressor kicking on, a lunch rush) is absorbed
|
|
82
|
+
* after a few seconds and stops re-firing forever.
|
|
83
|
+
*
|
|
84
|
+
* ── CALIBRATION, for the same reason `SceneChangeDetector` has it. On the
|
|
85
|
+
* first hops there is no trustworthy background, and firing off a floor built
|
|
86
|
+
* from one sample means every connector start costs an inference storm. The
|
|
87
|
+
* detector reports `calibrating` until it has `calibrationFrames` hops and
|
|
88
|
+
* refuses to fire until then. Unlike the visual detector it never RE-ENTERS
|
|
89
|
+
* calibration: there is no acoustic analogue of the dusk IR-cut flip that
|
|
90
|
+
* changes every pixel at once, and a detector that can be talked back into
|
|
91
|
+
* calibration by loud audio is a detector an attacker (or a busy store) can
|
|
92
|
+
* silence.
|
|
93
|
+
*
|
|
94
|
+
* ── REFRACTORY. One physical event is many loud hops. `refractoryMs` collapses
|
|
95
|
+
* a burst into ONE onset so a single dropped tray does not spend the feed's
|
|
96
|
+
* whole inference budget.
|
|
97
|
+
*
|
|
98
|
+
* ── UNITS: THIS CLASS EMITS dBFS AND NOTHING ELSE. dBFS here is a NEGATIVE
|
|
99
|
+
* number relative to full scale (digital silence floors at `SILENCE_DBFS`).
|
|
100
|
+
* It is deliberately NOT a 0..4 loudness tier. The Android DOOH fleet wired a
|
|
101
|
+
* tier-valued device field to a decibel-valued server field, and the decibel
|
|
102
|
+
* column has read as a constant sentinel on 100% of rows ever since — a value
|
|
103
|
+
* that scores perfectly on any fill-rate monitor while measuring nothing, and
|
|
104
|
+
* which pins every venue at "quiet". A tier and a decibel level are two
|
|
105
|
+
* quantities, not a naming difference; docs/runbooks/audio-sensing-substrate.md
|
|
106
|
+
* §3 names both fields and why they must never be aliased. Nothing in this file
|
|
107
|
+
* writes either of them: a caller that wants a tier must map dBFS to one
|
|
108
|
+
* explicitly and own that mapping.
|
|
109
|
+
*/
|
|
110
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
111
|
+
exports.AudioOnsetDetector = exports.SILENCE_DBFS = void 0;
|
|
112
|
+
exports.rmsDbfs = rmsDbfs;
|
|
113
|
+
/** dBFS reported for a digitally-silent hop. Finite so the EMA stays finite. */
|
|
114
|
+
exports.SILENCE_DBFS = -100;
|
|
115
|
+
const DEFAULTS = {
|
|
116
|
+
frameMs: 20,
|
|
117
|
+
thresholdDb: 12,
|
|
118
|
+
minDurationMs: 40,
|
|
119
|
+
refractoryMs: 3000,
|
|
120
|
+
calibrationFrames: 50,
|
|
121
|
+
backgroundAlpha: 0.02,
|
|
122
|
+
backgroundAbsorbAfterMs: 4000,
|
|
123
|
+
minLevelDbfs: -55,
|
|
124
|
+
};
|
|
125
|
+
/** RMS of a slice, expressed in dBFS (0 = full scale). */
|
|
126
|
+
function rmsDbfs(samples, from, to) {
|
|
127
|
+
let sum = 0;
|
|
128
|
+
for (let i = from; i < to; i++) {
|
|
129
|
+
const s = samples[i];
|
|
130
|
+
sum += s * s;
|
|
131
|
+
}
|
|
132
|
+
const n = Math.max(1, to - from);
|
|
133
|
+
const rms = Math.sqrt(sum / n);
|
|
134
|
+
if (!(rms > 0))
|
|
135
|
+
return exports.SILENCE_DBFS;
|
|
136
|
+
return Math.max(exports.SILENCE_DBFS, 20 * Math.log10(rms));
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Stateful, one instance per audio feed. PCM must be pushed to the SAME
|
|
140
|
+
* instance in capture order — like `SceneChangeDetector`, the background model
|
|
141
|
+
* is the state.
|
|
142
|
+
*/
|
|
143
|
+
class AudioOnsetDetector {
|
|
144
|
+
constructor(options) {
|
|
145
|
+
/** Samples carried across `push()` boundaries so hops are never torn. */
|
|
146
|
+
this.residue = new Float32Array(0);
|
|
147
|
+
this.background = exports.SILENCE_DBFS;
|
|
148
|
+
this.framesSeen = 0;
|
|
149
|
+
this.lastLevelDbfs = null;
|
|
150
|
+
/** ms of contiguous above-threshold audio accumulated so far. */
|
|
151
|
+
this.aboveMs = 0;
|
|
152
|
+
this.burstPeakDbfs = exports.SILENCE_DBFS;
|
|
153
|
+
this.burstBackgroundDbfs = exports.SILENCE_DBFS;
|
|
154
|
+
/** Set once a burst has fired, so it fires ONCE rather than every hop. */
|
|
155
|
+
this.burstFired = false;
|
|
156
|
+
this.lastOnsetAtMs = null;
|
|
157
|
+
this.onsets = 0;
|
|
158
|
+
this.suppressedByRefractory = 0;
|
|
159
|
+
if (!(options.sampleRate > 0)) {
|
|
160
|
+
throw new Error('AudioOnsetDetector requires a positive sampleRate');
|
|
161
|
+
}
|
|
162
|
+
this.sampleRate = options.sampleRate;
|
|
163
|
+
this.frameMs = Math.max(1, Math.trunc(options.frameMs ?? DEFAULTS.frameMs));
|
|
164
|
+
this.frameSamples = Math.max(1, Math.round((this.sampleRate * this.frameMs) / 1000));
|
|
165
|
+
this.thresholdDb = options.thresholdDb ?? DEFAULTS.thresholdDb;
|
|
166
|
+
this.minDurationMs = Math.max(0, options.minDurationMs ?? DEFAULTS.minDurationMs);
|
|
167
|
+
this.refractoryMs = Math.max(0, options.refractoryMs ?? DEFAULTS.refractoryMs);
|
|
168
|
+
this.calibrationFrames = Math.max(1, Math.trunc(options.calibrationFrames ?? DEFAULTS.calibrationFrames));
|
|
169
|
+
this.backgroundAlpha = Math.min(1, Math.max(0, options.backgroundAlpha ?? DEFAULTS.backgroundAlpha));
|
|
170
|
+
this.backgroundAbsorbAfterMs = Math.max(0, options.backgroundAbsorbAfterMs ?? DEFAULTS.backgroundAbsorbAfterMs);
|
|
171
|
+
this.minLevelDbfs = options.minLevelDbfs ?? DEFAULTS.minLevelDbfs;
|
|
172
|
+
this.now = options.now ?? Date.now;
|
|
173
|
+
}
|
|
174
|
+
isCalibrating() {
|
|
175
|
+
return this.framesSeen < this.calibrationFrames;
|
|
176
|
+
}
|
|
177
|
+
getStats() {
|
|
178
|
+
return {
|
|
179
|
+
framesSeen: this.framesSeen,
|
|
180
|
+
onsets: this.onsets,
|
|
181
|
+
calibrating: this.isCalibrating(),
|
|
182
|
+
backgroundDbfs: this.framesSeen === 0 ? null : this.background,
|
|
183
|
+
lastLevelDbfs: this.lastLevelDbfs,
|
|
184
|
+
suppressedByRefractory: this.suppressedByRefractory,
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Feed PCM. Returns every onset detected within THIS push (usually none, and
|
|
189
|
+
* at most one per `refractoryMs`). Sample count need not align to a hop — the
|
|
190
|
+
* remainder is carried into the next call so an event straddling a buffer
|
|
191
|
+
* boundary is not silently split.
|
|
192
|
+
*/
|
|
193
|
+
push(pcm, nowMs) {
|
|
194
|
+
const now = nowMs ?? this.now();
|
|
195
|
+
const events = [];
|
|
196
|
+
let buf;
|
|
197
|
+
if (this.residue.length === 0) {
|
|
198
|
+
buf = pcm;
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
buf = new Float32Array(this.residue.length + pcm.length);
|
|
202
|
+
buf.set(this.residue, 0);
|
|
203
|
+
buf.set(pcm, this.residue.length);
|
|
204
|
+
}
|
|
205
|
+
let offset = 0;
|
|
206
|
+
while (offset + this.frameSamples <= buf.length) {
|
|
207
|
+
const level = rmsDbfs(buf, offset, offset + this.frameSamples);
|
|
208
|
+
const event = this.consumeFrame(level, now);
|
|
209
|
+
if (event)
|
|
210
|
+
events.push(event);
|
|
211
|
+
offset += this.frameSamples;
|
|
212
|
+
}
|
|
213
|
+
this.residue = offset > 0 ? buf.slice(offset) : buf;
|
|
214
|
+
return events;
|
|
215
|
+
}
|
|
216
|
+
/** Drop all state — used when a feed reconnects and continuity is broken. */
|
|
217
|
+
reset() {
|
|
218
|
+
this.residue = new Float32Array(0);
|
|
219
|
+
this.background = exports.SILENCE_DBFS;
|
|
220
|
+
this.framesSeen = 0;
|
|
221
|
+
this.lastLevelDbfs = null;
|
|
222
|
+
this.aboveMs = 0;
|
|
223
|
+
this.burstPeakDbfs = exports.SILENCE_DBFS;
|
|
224
|
+
this.burstBackgroundDbfs = exports.SILENCE_DBFS;
|
|
225
|
+
this.burstFired = false;
|
|
226
|
+
// `lastOnsetAtMs` deliberately SURVIVES: the refractory window is about the
|
|
227
|
+
// physical room, not about our bookkeeping, and a flapping feed that reset
|
|
228
|
+
// it could re-fire on every reconnect.
|
|
229
|
+
}
|
|
230
|
+
/** One hop. Split out so the state machine is readable in one screen. */
|
|
231
|
+
consumeFrame(level, now) {
|
|
232
|
+
this.lastLevelDbfs = level;
|
|
233
|
+
// Seed from the FIRST real reading rather than from the silence floor, for
|
|
234
|
+
// the reason SceneChangeDetector seeds its contrast ring from the first real
|
|
235
|
+
// reading: a synthetic seed makes the mapping crawl for the whole startup
|
|
236
|
+
// window and manufactures phantom events while it does.
|
|
237
|
+
if (this.framesSeen === 0)
|
|
238
|
+
this.background = level;
|
|
239
|
+
this.framesSeen++;
|
|
240
|
+
const calibrating = this.isCalibrating();
|
|
241
|
+
const excess = level - this.background;
|
|
242
|
+
const isLoud = excess >= this.thresholdDb && level >= this.minLevelDbfs;
|
|
243
|
+
if (!isLoud) {
|
|
244
|
+
// Quiet hop: the background tracks the room freely, and the burst ends.
|
|
245
|
+
this.background += this.backgroundAlpha * (level - this.background);
|
|
246
|
+
this.aboveMs = 0;
|
|
247
|
+
this.burstPeakDbfs = exports.SILENCE_DBFS;
|
|
248
|
+
this.burstFired = false;
|
|
249
|
+
return null;
|
|
250
|
+
}
|
|
251
|
+
// Loud hop. Record the burst, but do NOT let it move the background until it
|
|
252
|
+
// has persisted long enough to be a room change rather than an event.
|
|
253
|
+
if (this.aboveMs === 0)
|
|
254
|
+
this.burstBackgroundDbfs = this.background;
|
|
255
|
+
this.aboveMs += this.frameMs;
|
|
256
|
+
this.burstPeakDbfs = Math.max(this.burstPeakDbfs, level);
|
|
257
|
+
if (this.aboveMs >= this.backgroundAbsorbAfterMs) {
|
|
258
|
+
this.background += this.backgroundAlpha * (level - this.background);
|
|
259
|
+
}
|
|
260
|
+
if (calibrating)
|
|
261
|
+
return null;
|
|
262
|
+
if (this.burstFired)
|
|
263
|
+
return null;
|
|
264
|
+
if (this.aboveMs < this.minDurationMs)
|
|
265
|
+
return null;
|
|
266
|
+
if (this.lastOnsetAtMs !== null && now - this.lastOnsetAtMs < this.refractoryMs) {
|
|
267
|
+
// Still one physical event as far as the product is concerned. Mark the
|
|
268
|
+
// burst fired so it is counted once, not once per hop.
|
|
269
|
+
this.burstFired = true;
|
|
270
|
+
this.suppressedByRefractory++;
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
this.burstFired = true;
|
|
274
|
+
this.lastOnsetAtMs = now;
|
|
275
|
+
this.onsets++;
|
|
276
|
+
return {
|
|
277
|
+
atMs: now,
|
|
278
|
+
peakDbfs: this.burstPeakDbfs,
|
|
279
|
+
backgroundDbfs: this.burstBackgroundDbfs,
|
|
280
|
+
excessDb: this.burstPeakDbfs - this.burstBackgroundDbfs,
|
|
281
|
+
durationMs: this.aboveMs,
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
exports.AudioOnsetDetector = AudioOnsetDetector;
|
|
286
|
+
//# sourceMappingURL=AudioOnsetDetector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioOnsetDetector.js","sourceRoot":"","sources":["../src/AudioOnsetDetector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2GG;;;AAwEH,0BAUC;AAhFD,gFAAgF;AACnE,QAAA,YAAY,GAAG,CAAC,GAAG,CAAC;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ED,IAAI,WAAW;YAAE,OAAO,IAAI,CAAC;QAC7B,IAAI,IAAI,CAAC,UAAU;YAAE,OAAO,IAAI,CAAC;QACjC,IAAI,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,aAAa;YAAE,OAAO,IAAI,CAAC;QAEnD,IAAI,IAAI,CAAC,aAAa,KAAK,IAAI,IAAI,GAAG,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YAChF,wEAAwE;YACxE,uDAAuD;YACvD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YACvB,IAAI,CAAC,sBAAsB,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC;QACzB,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,OAAO;YACL,IAAI,EAAE,GAAG;YACT,QAAQ,EAAE,IAAI,CAAC,aAAa;YAC5B,cAAc,EAAE,IAAI,CAAC,mBAAmB;YACxC,QAAQ,EAAE,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,mBAAmB;YACvD,UAAU,EAAE,IAAI,CAAC,OAAO;SACzB,CAAC;IACJ,CAAC;CACF;AAtKD,gDAsKC"}
|
|
@@ -5,6 +5,7 @@ import { type LocalNetworkVerdict } from './localNetworkAccess';
|
|
|
5
5
|
import { SharedFrameSource } from './MosaicSource';
|
|
6
6
|
import type { EdgeAgentConfig, MosaicTile, RecorderIdentity } from './config';
|
|
7
7
|
import { type VlmAdmissionStats } from './VlmAdmissionGate';
|
|
8
|
+
import { type AudioSensingOptions } from './attachAudioOnset';
|
|
8
9
|
import { type MotionGateOptions, type MotionGateReason } from './SceneChangeDetector';
|
|
9
10
|
import { type VlmCandidateBufferOptions, type VlmCandidateBufferStats } from './VlmCandidateBuffer';
|
|
10
11
|
import { type DurableVlmCandidateSpoolOptions } from './DurableVlmCandidateSpool';
|
|
@@ -112,10 +113,24 @@ export interface SensingLoopDeps {
|
|
|
112
113
|
name: string;
|
|
113
114
|
camera: CameraProvider;
|
|
114
115
|
client: SensingClient;
|
|
116
|
+
/**
|
|
117
|
+
* RTSP URL for this feed's AUDIO pull, when it has one. Separate from the
|
|
118
|
+
* camera provider because audio is a long-lived session on its own bounded
|
|
119
|
+
* per-recorder lane, not a frame pull — see `RTSPAudioProvider`. Absent ⇒ no
|
|
120
|
+
* audio for this feed, which is the common case and not an error.
|
|
121
|
+
*/
|
|
122
|
+
audioRtspUrl?: string;
|
|
115
123
|
}
|
|
116
124
|
export interface CloudSensingManagerOptions {
|
|
117
125
|
/** Per-feed capture loops. */
|
|
118
126
|
loops: SensingLoopDeps[];
|
|
127
|
+
/**
|
|
128
|
+
* Acoustic sensing. DISABLED unless `enabled: true` — that default is a
|
|
129
|
+
* consent position, not a rollout setting (see `attachAudioOnset`). When on,
|
|
130
|
+
* each feed opens ONE long-lived audio session per physical recorder and its
|
|
131
|
+
* onsets carry frames the motion cascade would have dropped.
|
|
132
|
+
*/
|
|
133
|
+
audioSensing?: AudioSensingOptions;
|
|
119
134
|
/** Capture interval (ms) when NO faces. Default: 300000. */
|
|
120
135
|
periodicIntervalMs?: number;
|
|
121
136
|
/** Capture interval (ms) when faces ARE detected. Default: 30000. */
|
|
@@ -329,6 +344,9 @@ export declare class CloudSensingManager extends EventEmitter {
|
|
|
329
344
|
private candidatePumpTimer;
|
|
330
345
|
private readonly motionDrivesCadence;
|
|
331
346
|
/** Retained so a cadence change can rebuild each feed's gate heartbeat. */
|
|
347
|
+
private readonly audioSensingOptions;
|
|
348
|
+
/** Live audio attachments, keyed by feed name. Empty unless audio is enabled. */
|
|
349
|
+
private audioAttachments;
|
|
332
350
|
private motionGateOptions;
|
|
333
351
|
/** Look-rate for a still feed when the cascade is on. null ⇒ cascade off. */
|
|
334
352
|
private motionScanIntervalMs;
|
|
@@ -550,6 +568,37 @@ export declare class CloudSensingManager extends EventEmitter {
|
|
|
550
568
|
start(opts?: {
|
|
551
569
|
healthOnly?: boolean;
|
|
552
570
|
}): Promise<void>;
|
|
571
|
+
/**
|
|
572
|
+
* Open one audio session per feed that has a URL and a gate. Sequential
|
|
573
|
+
* rather than parallel: the per-recorder audio lane is capacity 1 by default,
|
|
574
|
+
* so racing N channels of one NVR would just produce N-1 admission refusals
|
|
575
|
+
* in a nondeterministic order.
|
|
576
|
+
*/
|
|
577
|
+
private attachAudioSensing;
|
|
578
|
+
/**
|
|
579
|
+
* What acoustic config this manager RECEIVED — as opposed to what is live.
|
|
580
|
+
*
|
|
581
|
+
* Exists so "did the config key arrive?" is answerable WITHOUT starting the
|
|
582
|
+
* loops (starting opens real RTSP cameras). That question needs its own
|
|
583
|
+
* answer because the failure it guards against is silent: in
|
|
584
|
+
* `sensingRunMode.ts`, `minScanIntervalMs` is documented in config.ts,
|
|
585
|
+
* promised here, and dropped in between — vocabulary agreeing on both sides
|
|
586
|
+
* while the value never arrives. Asserting the option TYPE exists cannot see
|
|
587
|
+
* that; asserting the VALUE landed can.
|
|
588
|
+
*/
|
|
589
|
+
getAudioSensingConfig(): {
|
|
590
|
+
enabled: boolean;
|
|
591
|
+
sampleRate?: number;
|
|
592
|
+
maxAudioSessionsPerSource?: number;
|
|
593
|
+
transport?: 'tcp' | 'udp';
|
|
594
|
+
onset?: unknown;
|
|
595
|
+
} | null;
|
|
596
|
+
/** Live acoustic attachments, for health/diagnostics. */
|
|
597
|
+
getAudioSensingStats(): Array<{
|
|
598
|
+
feed: string;
|
|
599
|
+
onsets: number;
|
|
600
|
+
calibrating: boolean;
|
|
601
|
+
}>;
|
|
553
602
|
/** Stop all loops and close cameras. */
|
|
554
603
|
stop(): Promise<void>;
|
|
555
604
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudSensingManager.d.ts","sourceRoot":"","sources":["../src/CloudSensingManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;A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CA4EpE"}
|
|
@@ -11,6 +11,7 @@ const MosaicSource_1 = require("./MosaicSource");
|
|
|
11
11
|
const runtimePaths_1 = require("./runtimePaths");
|
|
12
12
|
const legacyRecorderProfile_1 = require("./legacyRecorderProfile");
|
|
13
13
|
const VlmAdmissionGate_1 = require("./VlmAdmissionGate");
|
|
14
|
+
const attachAudioOnset_1 = require("./attachAudioOnset");
|
|
14
15
|
const SceneChangeDetector_1 = require("./SceneChangeDetector");
|
|
15
16
|
const VlmCandidateBuffer_1 = require("./VlmCandidateBuffer");
|
|
16
17
|
const DurableVlmCandidateSpool_1 = require("./DurableVlmCandidateSpool");
|
|
@@ -235,7 +236,8 @@ class CloudSensingManager extends events_1.EventEmitter {
|
|
|
235
236
|
this.localNetworkVerdict = null;
|
|
236
237
|
this.localNetworkProbeInFlight = false;
|
|
237
238
|
this.candidatePumpTimer = null;
|
|
238
|
-
/**
|
|
239
|
+
/** Live audio attachments, keyed by feed name. Empty unless audio is enabled. */
|
|
240
|
+
this.audioAttachments = [];
|
|
239
241
|
this.motionGateOptions = null;
|
|
240
242
|
/** Look-rate for a still feed when the cascade is on. null ⇒ cascade off. */
|
|
241
243
|
this.motionScanIntervalMs = null;
|
|
@@ -388,6 +390,7 @@ class CloudSensingManager extends events_1.EventEmitter {
|
|
|
388
390
|
})
|
|
389
391
|
: new VlmCandidateBuffer_1.VlmCandidateBuffer({ ...options.candidateBuffer, now: this.now });
|
|
390
392
|
this.candidatePumpIntervalMs = Math.max(1, Math.trunc(options.candidateBuffer?.pumpIntervalMs ?? this.admissionRetryDelayMs));
|
|
393
|
+
this.audioSensingOptions = options.audioSensing;
|
|
391
394
|
this.motionDrivesCadence = options.motionDrivesCadence ?? motionGateEnabled;
|
|
392
395
|
this.cadenceSource = options.cadenceSource;
|
|
393
396
|
this.cadenceRefreshIntervalMs = Math.max(1000, Math.trunc(options.cadenceRefreshIntervalMs ?? DEFAULT_CADENCE_REFRESH_MS));
|
|
@@ -626,6 +629,11 @@ class CloudSensingManager extends events_1.EventEmitter {
|
|
|
626
629
|
s.runMotionSkipped = 0;
|
|
627
630
|
void this.startLoop(s, generation).catch((err) => this.emitLoopError(s, err));
|
|
628
631
|
}
|
|
632
|
+
// Acoustic sensing, when the operator has turned it on. Attaching is
|
|
633
|
+
// best-effort and fire-and-forget: `attachAudioOnset` never throws, returns
|
|
634
|
+
// null for a feed with no audio, and nothing here may delay or fail the
|
|
635
|
+
// capture loops that already started above.
|
|
636
|
+
void this.attachAudioSensing();
|
|
629
637
|
this.scheduleCandidatePump(generation);
|
|
630
638
|
// Ask once at startup so a connector picks up its deployed cadence on boot
|
|
631
639
|
// rather than after a full refresh period, then keep asking. Both are
|
|
@@ -641,6 +649,72 @@ class CloudSensingManager extends events_1.EventEmitter {
|
|
|
641
649
|
this.cadenceTimer.unref();
|
|
642
650
|
}
|
|
643
651
|
}
|
|
652
|
+
/**
|
|
653
|
+
* Open one audio session per feed that has a URL and a gate. Sequential
|
|
654
|
+
* rather than parallel: the per-recorder audio lane is capacity 1 by default,
|
|
655
|
+
* so racing N channels of one NVR would just produce N-1 admission refusals
|
|
656
|
+
* in a nondeterministic order.
|
|
657
|
+
*/
|
|
658
|
+
async attachAudioSensing() {
|
|
659
|
+
if (this.audioSensingOptions?.enabled !== true)
|
|
660
|
+
return;
|
|
661
|
+
// HEALTH-ONLY IS NOT SENSING. In this mode the manager is proving the camera
|
|
662
|
+
// is alive while inference is unavailable (`idleSensingState()` reports
|
|
663
|
+
// exactly that), so opening a LONG-LIVED audio session would hold the
|
|
664
|
+
// recorder's audio slot — capacity 1 per host:port — for a run that is not
|
|
665
|
+
// going to analyse anything, and would deny it to a connector that is.
|
|
666
|
+
// Audio attaches when sensing does, and `start()` is called again with the
|
|
667
|
+
// full mode when capacity returns.
|
|
668
|
+
if (this.healthOnlyMode)
|
|
669
|
+
return;
|
|
670
|
+
for (const s of this.loops) {
|
|
671
|
+
if (!this.running)
|
|
672
|
+
return;
|
|
673
|
+
const rtspUrl = s.deps.audioRtspUrl;
|
|
674
|
+
if (!rtspUrl || !s.motionGate)
|
|
675
|
+
continue;
|
|
676
|
+
const attachment = await (0, attachAudioOnset_1.attachAudioOnset)({
|
|
677
|
+
feedName: s.deps.name,
|
|
678
|
+
rtspUrl,
|
|
679
|
+
gate: s.motionGate,
|
|
680
|
+
options: this.audioSensingOptions,
|
|
681
|
+
now: this.now,
|
|
682
|
+
});
|
|
683
|
+
if (attachment)
|
|
684
|
+
this.audioAttachments.push(attachment);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* What acoustic config this manager RECEIVED — as opposed to what is live.
|
|
689
|
+
*
|
|
690
|
+
* Exists so "did the config key arrive?" is answerable WITHOUT starting the
|
|
691
|
+
* loops (starting opens real RTSP cameras). That question needs its own
|
|
692
|
+
* answer because the failure it guards against is silent: in
|
|
693
|
+
* `sensingRunMode.ts`, `minScanIntervalMs` is documented in config.ts,
|
|
694
|
+
* promised here, and dropped in between — vocabulary agreeing on both sides
|
|
695
|
+
* while the value never arrives. Asserting the option TYPE exists cannot see
|
|
696
|
+
* that; asserting the VALUE landed can.
|
|
697
|
+
*/
|
|
698
|
+
getAudioSensingConfig() {
|
|
699
|
+
const o = this.audioSensingOptions;
|
|
700
|
+
if (!o)
|
|
701
|
+
return null;
|
|
702
|
+
return {
|
|
703
|
+
enabled: o.enabled === true,
|
|
704
|
+
sampleRate: o.sampleRate,
|
|
705
|
+
maxAudioSessionsPerSource: o.maxAudioSessionsPerSource,
|
|
706
|
+
transport: o.transport,
|
|
707
|
+
onset: o.onset,
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
/** Live acoustic attachments, for health/diagnostics. */
|
|
711
|
+
getAudioSensingStats() {
|
|
712
|
+
return this.audioAttachments.map((a) => ({
|
|
713
|
+
feed: a.feedName,
|
|
714
|
+
onsets: a.onsetCount(),
|
|
715
|
+
calibrating: a.detectorStats().calibrating,
|
|
716
|
+
}));
|
|
717
|
+
}
|
|
644
718
|
/** Stop all loops and close cameras. */
|
|
645
719
|
async stop() {
|
|
646
720
|
this.running = false;
|
|
@@ -657,6 +731,13 @@ class CloudSensingManager extends events_1.EventEmitter {
|
|
|
657
731
|
// Memory holds are cleared; durable evidence remains for a later accepted
|
|
658
732
|
// analysis or the documented retention/quota limit.
|
|
659
733
|
this.candidates?.stopRun();
|
|
734
|
+
// Close audio sessions so the recorder's audio lane is freed for the next
|
|
735
|
+
// run — a leaked session would deny audio to this same feed on restart.
|
|
736
|
+
const audio = this.audioAttachments;
|
|
737
|
+
this.audioAttachments = [];
|
|
738
|
+
for (const a of audio) {
|
|
739
|
+
void a.close().catch(() => undefined);
|
|
740
|
+
}
|
|
660
741
|
if (this.cadenceTimer) {
|
|
661
742
|
clearInterval(this.cadenceTimer);
|
|
662
743
|
this.cadenceTimer = null;
|
|
@@ -1699,6 +1780,7 @@ function emptyMotionReasonCounts() {
|
|
|
1699
1780
|
return {
|
|
1700
1781
|
heartbeat: 0,
|
|
1701
1782
|
motion: 0,
|
|
1783
|
+
audio_onset: 0,
|
|
1702
1784
|
no_motion: 0,
|
|
1703
1785
|
calibrating: 0,
|
|
1704
1786
|
stationary: 0,
|
|
@@ -1869,6 +1951,7 @@ function buildSensingLoops(config, deps) {
|
|
|
1869
1951
|
}
|
|
1870
1952
|
const loop = (feed, camera) => ({
|
|
1871
1953
|
name: feed.name,
|
|
1954
|
+
audioRtspUrl: feed.rtspUrl,
|
|
1872
1955
|
camera,
|
|
1873
1956
|
client: clientFactory(feed),
|
|
1874
1957
|
});
|