browser audio detection phase 3

This commit is contained in:
Joren de Graaf
2026-10-02 21:34:38 +02:00
parent c68e4b95ba
commit 1de4b8a0b3
50 changed files with 24755 additions and 144 deletions
@@ -0,0 +1 @@
class w{static evaluate(c,s){var l,h;console.log("[BoomCast][Gate] Evaluating browser classification.");const n=new Set((s.whitelist||[]).map(e=>e.toLowerCase())),r=new Set((s.privacy_sensitive_speech||[]).map(e=>e.toLowerCase())),m=Number(((l=s.thresholds)==null?void 0:l.relevance)??.5),i=Number(((h=s.thresholds)==null?void 0:h.speech)??.5),t=c.filter(e=>n.has(e.class.toLowerCase())&&e.score>=m),o=c.some(e=>r.has(e.class.toLowerCase())&&e.score>=i);console.log("[BoomCast][Gate] Relevant whitelist matches:",t),console.log("[BoomCast][Gate] Speech detected:",o);const a=t.length?"whitelist_match":o?"speech_only":"no_match";return console.log(`[BoomCast][Gate] Decision: ${a.toUpperCase()}`),a!=="whitelist_match"&&console.log("[BoomCast][Gate] Automatic upload suppressed."),{result:a,speechDetected:o,matches:t}}}export{w as BrowserSubmissionGate};