ricky0123 / vad

Voice activity detector (VAD) for the browser with a simple API
https://www.vad.ricky0123.com
Other
615 stars 98 forks source link

aborted() on Android Chrome #115

Open flatsiedatsie opened 3 weeks ago

flatsiedatsie commented 3 weeks ago

I'm trying to debug an issue with mobile use of an STT pipeline. Basically VAD creates audio arrays, and Whisper running via Transformers.js then transcribes that audio.

This works great on desktop browsers, but on Chrome on Android I get the following errror:

Screenshot 2024-06-12 at 16 25 22

Do you have any insight into what isssue the error chain points to?

flatsiedatsie commented 3 weeks ago

I just tried running the demo in Firefox on Android, and the demo didn't run. Neither did it on Chrome on Android.

Is there no mobile browser support?

flatsiedatsie commented 3 weeks ago

Did a remote debugging of the demo on Chrome.

[VAD] initializing vad
vad.worklet.bundle.min.js:1 [VAD] initializing worklet
vad.worklet.bundle.min.js:1 [VAD] initialized worklet
demo.js:15310 env.wasm.numThreads is set to 4, but this will not work unless you enable crossOriginIsolated mode. See https://web.dev/cross-origin-isolation-guide/ for more info.
ug @ demo.js:15310
demo.js:16261 [VAD] vad is initialized

In my project cross origin isolation is enabled, so I don't think that's the issue. And the demo works on desktop browsers, where I see the same warning.

ricky0123 commented 3 weeks ago

@flatsiedatsie that's quite interesting, I just checked and the demo still works on my pixel phone on both firefox and chrome. Does it prompt you for microphone permissions? What device are you using?