harritaylor / torchvggish

Pytorch port of Google Research's VGGish model used for extracting audio features.
Apache License 2.0
374 stars 66 forks source link

How to load raw audio file #2

Closed cryax closed 5 years ago

cryax commented 5 years ago

Can you provide an example of how to load a raw audio file and using vggish as feature extractor in pytorch?

harritaylor commented 5 years ago

Sure thing. I'll get a notebook written this week detailing it. It is however a drop-in replacement for vggish as provided by tensorflow, so if you use the preprocessing code provided at https://github.com/tensorflow/models/tree/master/research/audioset, it should work just the same in the meantime.

harritaylor commented 5 years ago

Hi @cryax, sorry about the delay - busy few weeks. Here's an example. Hope you find it useful. https://github.com/harritaylor/torchvggish/blob/master/audio_embedding_example.ipynb