Hi folks,
Due to a few months not being able to develop, I had lots of time to read and gather ideas. As a result, lots of new node designs are jumping around in my head. So I want to start developing slowly again, with a small node...
So here is the beta version of node-red-contrib-sound-classifier
It is not on NPM yet, so you need to install it directly from my Github account if you want to test it...
The node runs (locally) the YAMNet model, which is trained to recognize 521 different sounds in WAV fragments, which are injected via the input messages. The input can (optionally) automatically be converted to the required 16kHz mono WAV.
A quick demo:
Remark: I had to use an old 1.4.0 version of Tensorflow (from our friend @dceejay), otherwise I couldn't install it for some reason on my Raspberry:
As always all "constructive" is very welcome!
Damn now I have a very long list of issues and feature requests for all my nodes - from people all over the globe - waiting to be implemented
Have fun with it!!
Bart
3 Likes
Have you got a practical use in mind Bart?
That obvious ...
If you want to turn on the kitchens lights - Yell
To turn them off - go outside and ring the doorbell
oops - just read
Welcome back to the land of coding @BartButenaers
I have added some use cases on the readme page now: see "use cases".
I got an idea for such a node a few years ago already. In a town nearby is a large squary with a series of pubs. Every weekend there was a lot of fights, mostly with broken pints. So at the end the police bought a surveillance system with smart microphones and camera's. As soon as one of the microphones detects a glass break sound, the cameras automatically zoom in on that part of the square. When I read that article at the time being, it got my attention immediately...
I am aware that we will never be able to reach this kind of quality, but now at least you can build your own low budget sound surveillance system. Free toys for boys ...
If you ever do this experiment, please record it on video.
And please make sure that the sound is included!
Just can't wait to see you in action ...
And be aware that I have a very vivid imagination: if I close my eyes, I already see you running in your short pyjamas through your living room
Thanks Simon! Your node is very high on my TODO list ...
2 Likes
Welcome back Bart! Have you tried this with @jgkk 's Sox util nodes ?
Hi Dave, thanks!
Feels great to build useless nodes for geaks
Indeed it has came up in my mind already: I should test this with a real life stream of audio fragments. But when I look at my list of open issues and feature requests, then I have to limit my scope a bit at the moment. To be honest, I was hoping that @JGKK would see this thread and pass by with some tips to pimp my node...
Here's a link to the list of Yamnet sound models to inspire creativity.
Thanks for the link Paul! I had already added a link to my (similar) class_mapping.js file, but your link is more human readable ...