Spaces:
Build error
Build error
File size: 1,209 Bytes
d036110 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | **Looking for maintainers** - I no longer have the capacity to maintain this project. If you would like to take over maintenence, please get in touch. I will either forward to your fork, or add you as a maintainer for the project. Thanks.
---
# VGGish
A `torch`-compatible port of [VGGish](https://github.com/tensorflow/models/tree/master/research/audioset)<sup>[1]</sup>,
a feature embedding frontend for audio classification models. The weights are ported directly from the tensorflow model, so embeddings created using `torchvggish` will be identical.
## Usage
```python
import torch
model = torch.hub.load('harritaylor/torchvggish', 'vggish')
model.eval()
# Download an example audio file
import urllib
url, filename = ("http://soundbible.com/grab.php?id=1698&type=wav", "bus_chatter.wav")
try: urllib.URLopener().retrieve(url, filename)
except: urllib.request.urlretrieve(url, filename)
model.forward(filename)
```
<hr>
[1] S. Hershey et al., ‘CNN Architectures for Large-Scale Audio Classification’,\
in International Conference on Acoustics, Speech and Signal Processing (ICASSP),2017\
Available: https://arxiv.org/abs/1609.09430, https://ai.google/research/pubs/pub45611
|