1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="30061a89-93b5-4b55-9f30-fe3473aec40b",e._sentryDebugIdIdentifier="sentry-dbid-30061a89-93b5-4b55-9f30-fe3473aec40b")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3901],{13901:(e,n,t)=>{t.d(n,{T:()=>i,Ut:()=>o,bo:()=>a,detectSpeechSilenceRanges:()=>u});let a=.6;function r(e){return(e.start+e.end)/2}function l(e){return Math.max(0,e.end-e.start)}function o(e,n){let t=n.minGapSeconds??.18,{roomLimitSeconds:a,lowerBoundSeconds:o}=n;if(a<=o)return null;let i=null;for(let n of e){if(l(n)<t)continue;if(n.start<=a&&n.end>=a&&a>=o)return a;let e=r(n);e<o||e>a||(null===i||e>i)&&(i=e)}return i}function i(e){let{beatTokenCounts:n,takeDurationSeconds:t,silenceRanges:o}=e,i=e.minSegmentSeconds??a,s=n.length;if(0===s||t<=0)return[];if(1===s)return[{startSeconds:0,endSeconds:t,beatIndices:[0]}];let u=n.reduce((e,n)=>e+Math.max(0,n),0);if(u<=0)return[];let c=[],d=0;for(let e=0;e<s-1;e+=1)d+=Math.max(0,n[e]),c.push(d/u*t);let f=[],h=0,b=[0],g=0;for(let n=0;n<s-1;n+=1){let a=function(e,n,t){let a=t.minGapSeconds??.18,o=t.maxSnapSeconds??2,{lowerBoundSeconds:i,upperBoundSeconds:s}=t;if(s<=i)return null;let u=null,c=1/0;for(let t of e){if(l(t)<a)continue;let e=r(t);if(e<i||e>s)continue;let d=Math.abs(e-n);!(d>o)&&d<c&&(c=d,u=e)}return u}(o,c[n],{minGapSeconds:e.minGapSeconds,maxSnapSeconds:e.maxSnapSeconds,lowerBoundSeconds:g+i,upperBoundSeconds:t-i});if(null===a||a<=h+i){b.push(n+1);continue}f.push({startSeconds:h,endSeconds:a,beatIndices:b}),h=a,g=a,b=[n+1]}return f.push({startSeconds:h,endSeconds:t,beatIndices:b}),f}async function s(e){let n=window.AudioContext??window.webkitAudioContext;if(!n)throw Error("AudioContext unavailable");let t=new n;try{let n=await t.decodeAudioData(await e.arrayBuffer());return{samples:function(e){let n=Math.max(1,e.numberOfChannels),t=e.length,a=new Float32Array(t);for(let r=0;r<n;r+=1){let l=e.getChannelData(r);for(let e=0;e<t;e+=1)a[e]+=l[e]/n}return a}(n),sampleRate:n.sampleRate,durationSeconds:n.duration}}finally{t.close().catch(()=>void 0)}}async function u(e,n){try{let{samples:a,sampleRate:r,durationSeconds:l}=await s(e);if(l<=0||0===a.length)return null;try{let{analyzeSpeechWithBrowserVad:e}=await t.e(3727).then(t.bind(t,3727)),n=await e({samples:a,sampleRate:r,duration:l});if(n&&n.activeRanges.length>0)return{silenceRanges:n.silenceRanges,durationSeconds:l,provider:"silero_vad"}}catch(e){n?.("Marketing voiceover VAD unavailable - energy-threshold fallback",{error:e?.message})}let{buildLoudnessEnvelope:o,buildSpeechActivityFromLoudness:i}=await t.e(2647).then(t.bind(t,82647)),u=o(a,r),c=i(u.dbfs,u.windowSeconds,l);if(0===c.activeRanges.length)return null;return{silenceRanges:c.silenceRanges,durationSeconds:l,provider:"energy_threshold"}}catch(e){return n?.("Marketing voiceover silence detection failed",e?.message),null}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.