Upload index.html with huggingface_hub
Browse files110 unmodified lines111112113114115116117110 unmodified linesfunction playChunk(b64){const bin=atob(b64),by=new Uint8Array(bin.length); for(let i=0;i<bin.length;i++)by[i]=bin.charCodeAt(i);const i16=new Int16Array(by.buffer),n=i16.length>>1; if(n<1)return;if(ctx&&nextTime>ctx.currentTime+0.6)return; // queue too deep -> drop chunk, cap latencyconst buf=ctx.createBuffer(2,n,SR),L=buf.getChannelData(0),R=buf.getChannelData(1);for(let i=0;i<n;i++){L[i]=i16[2*i]/32768;R[i]=i16[2*i+1]/32768;}const s=ctx.createBufferSource(); s.buffer=buf; s.connect(analyser);110 unmodified lines111112113114115116110 unmodified linesfunction playChunk(b64){const bin=atob(b64),by=new Uint8Array(bin.length); for(let i=0;i<bin.length;i++)by[i]=bin.charCodeAt(i);const i16=new Int16Array(by.buffer),n=i16.length>>1; if(n<1)return;const buf=ctx.createBuffer(2,n,SR),L=buf.getChannelData(0),R=buf.getChannelData(1);for(let i=0;i<n;i++){L[i]=i16[2*i]/32768;R[i]=i16[2*i+1]/32768;}const s=ctx.createBufferSource(); s.buffer=buf; s.connect(analyser);
index.html-1