https://editor.p5js.org/yg2348/sketches/fCr0l0W43
For my homework assignment I wanted to try whisper from transformers.js. I first tried to use it in P5.js, however I was facing this specific error:
My program was still running but I’m not sure if this error affected the performance of the model. I had to get some help from AI to write the program and even then I wasn’t able to get it to work. I added console log statements which told me when the model is loaded and I even tried to get the audio level as well, and even though it reported seeing audio, it didn't detect any audio.
the text generator worked well, but I felt the model took too long to load. If they were combined with a more complex program, I believe it would take even longer to work and would create even more performance issues.
Personally, I prefer ml5.js over transformers.js. While transformers have more technical capabilities, I believe ml5 is just easier to use and is much better performance vise.