Open topcmm opened 1 year ago
Hi @topcmm which mobile browser? Safari?
so almost all mobile browsers dont allow automatic audio streaming, hence it would be nice if there are nice libraries so we can develop it for react native....there is one for flutter. https://github.com/char5742/flutter_silero_vad
ios Safari cannot run properly, https://www.vad.ricky0123.com/ keeps loading.
I took a look and it seems that the onnx and wasm files have not been loaded yet (but there is no error in vad). How can I get the loading information of these two files, or load them before the app runs?
I took a look and it seems that the onnx and wasm files have not been loaded yet (but there is no error in vad). How can I get the loading information of these two files, or load them before the app runs?
I know what to do, I need to judge vad. loading
Your demo site https://www.vad.ricky0123.com is working in mobile browsers like Chrome or Safari. I created a sample page using the code below
<script src="https://cdn.jsdelivr.net/npm/onnxruntime-web@1.14.0/dist/ort.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@ricky0123/vad-web@0.0.7/dist/bundle.min.js"></script>
<script>
async function main() {
const myvad = await vad.MicVAD.new({
onSpeechStart: () => {
console.log("Speech start detected")
},
onSpeechEnd: (audio) => {
// do something with `audio` (Float32Array of audio samples at sample rate 16000)...
}
})
myvad.start()
}
main()
</script>
But It gives me this error on IOS Chrome or Safari browsers: Error: no available backend found. ERR: [wasm] RangeError: Out of memory, [cpu] Error: previous call to 'initWasm()' failed.
What could be the problem?
it's working in pc, but not working in mobile browser