1const e={id:"speech-intel",title:"Speech Intelligibility",description:"STI/STIPA-inspired intelligibility testing.",category:"Speech Tests",defaultSettings:{snr:0,reverbTime:0,testMode:"modulation",playing:!1},createNodes(e,t){const s=e.createAnalyser() 2return s.fftSize=4096,s.connect(t),{analyser:s,source:null}},start(e,t,s){const i=this.createModulatedNoise(s),a=s.createBufferSource() 3a.buffer=i,a.loop=!0,a.connect(e.analyser),a.start(),e.source=a},createModulatedNoise(e){const t=2*e.sampleRate,s=e.createBuffer(1,t,e.sampleRate),data=s.getChannelData(0) 4for(let s=0;s<t;s++){const t=s/e.sampleRate,i=.5+.5*Math.sin(8*Math.PI*t) 5data[s]=.3*(2*Math.random()-1)*i}return s},stop(e){e.source&&(e.source.stop(),e.source=null)},updateSettings(e,t,s){},keyboard:{handlers:{" ":e=>({playing:!e.playing})}},visualization:{type:"sti-display"},controls:{showPlayButton:!0,infoText:"Test speech transmission index. Higher SNR improves intelligibility."}} 6export{e as default}
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.