googlecreativelab / teachablemachine-community

Example code snippets and machine learning code for Teachable Machine
https://g.co/teachablemachine
Apache License 2.0
1.51k stars 678 forks source link

[FEATURE REQUEST]: Could you add python functionality for Audio models? #197

Open AdriBee opened 3 years ago

AdriBee commented 3 years ago

Adding a way to export the audio models for python applications. A keras option (like on the image one) will be awesome.

Thanks!

charlielito commented 3 years ago

Hey @AdriBee , I had the same problem trying to run an audio model in a headless device with python. I could make it work but with node.js, but the trick could work also with python. The little trick was to launch a headless chromium with puppeteer where the javascript run the model and inside the node.js script the predictions are parsed and then you are free to go and do whatever with the predictions.

I made it to turn off/on my room's light. If you want to check out the code and how to do it go to: https://github.com/charlielito/teachable-machines-audio-demo

Any feedback is welcome!