ml5js / ml5-next-gen

Repo for next generation of ml5.js: friendly machine learning for the web! 🤖
https://ml5js.org/
Other
92 stars 23 forks source link

SoundClassifier sample not working in Firefox #221

Open enkatsu opened 1 month ago

enkatsu commented 1 month ago

Hello ml5.js community, The sample code for the SoundClassifier did not work in Firefox, but it worked fine in Chrome. Doesn't ml5.js support Firefox?

Browser

Firefox: 131.0.2 (aarch64)

Sample code

https://docs.ml5js.org/#/reference/sound-classifier?id=quick-start https://editor.p5js.org/ml5/sketches/HUm7NYMW3

Error message

TypeError: results is null
    at gotResult (/sketch.js:90:3)

    at getTopKClasses (webpack:[//ml5/src/SoundClassifier/speechcommands.js:50:18](https://ml5/src/SoundClassifier/speechcommands.js:50:18))
enkatsu commented 1 month ago

For your reference, a similar TensorFlow.js example worked in Firefox. https://github.com/tensorflow/tfjs-models/tree/master/speech-commands https://storage.googleapis.com/tfjs-speech-model-test/2019-01-03a/dist/index.html