googlecreativelab / teachablemachine-community

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

How can I use the pretrained audio model in Python? #68

Open b3326023 opened 4 years ago

b3326023 commented 4 years ago

Thanks for making this awesome project! But how can I use the pretrained audio model in Python? I want to use Keras or Tensorflow in Python to train my own model through the transfer learning on your introduced pretrained model, Speech-Commands. Could you please give some instructions to help me do this?

Thanks a lot!

irealva commented 4 years ago

Hi @b3326023 this is a request we've gotten and are trying to work on. We don't support this just yet.

See issue #36 and #66

charlielito commented 3 years ago

Hey guys, 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!