This is a customized version of the edge impulse linux audio classifer with a MongoDB connection and data filtering.
The audio classifier can be used to recognize particular sounds based on the model trained on edge impulse. This particular classifier can classify the following sounds:
- Background (mostly silence)
- Bark
- Growl
- Whine
The background sound is then filtered out and the highest scoring class > 0.99 is logged into a mongodb database with a timestamp.
- Node Js
- SoX
- Microphone
- Clone this repo and navigate into it.
- Run
npm install
to install dependencies - Run
npm install edge-impulse-linux -g --unsafe-perm
. - Create a .env file and add your mongodb atlas URI
ATLAS_URL = <your mongodb connection string>
- Download your model file from your Edge Impulse project/account with:
edge-impulse-linux-runner --download modelfile.eim
*Connect a microphone and runnode classsify.js
- You will get an error that shows you all available microphones.
- Run
node classify-audio.js modelfile.eim <microphone name>
You can customize classify-audio.js
for different sounds as well as databases etc.