0

I need to use ml5.js for recognition of an audio to detect if the voice is from an animal (like bark or meow) or a background noise.

Everything works, but I would like to know if is possible to use an audio instead of granting microphone access and try to listen to the audio and detect.

I've looked in ml5 docs but I didn't find anything. I've tried to look in ml5 source too but I didn't find nothing.

If someone has a solution, please let me know by sending me a doc. Thanks.

Lee Taylor
  • 7,761
  • 16
  • 33
  • 49

1 Answers1

0

You'd have to look into the actual tensorflowjs source. ML5 is just a wrapper for tensorflow.js!

https://www.tensorflow.org/js

The tensorflow docs say you CAN use a spectogram (a Float32Array) to classify sound. That means you have to create that spectogram from your audio file (a .wav file) yourself.

Spectogram documentation

Kokodoko
  • 26,167
  • 33
  • 120
  • 197