https://github.com/amanpriyanshu/vggish
My implementation of VGGish
https://github.com/amanpriyanshu/vggish
Last synced: 4 months ago
JSON representation
My implementation of VGGish
- Host: GitHub
- URL: https://github.com/amanpriyanshu/vggish
- Owner: AmanPriyanshu
- Created: 2020-11-08T18:53:54.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-23T13:38:18.000Z (over 4 years ago)
- Last Synced: 2025-04-03T03:25:10.787Z (7 months ago)
- Language: Python
- Size: 16.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: Contributing.md
Awesome Lists containing this project
README
# vggish
My implementation of VGGish. The model has an easy to use implementation and assimilates VGGish into the latest tensorflow version.
## Set-Up:
To clone the repository please use the command:
```console
git clone https://github.com/AmanPriyanshu/vggish.git
```
## Describing Dataset:
To load and describe the dataset we will first use the modules present within properties_of_dataset.py. Following is a simple implementation of its usage:
CODE:
```python
from vggish_loader import loading_dataset, properties_of_dataset, loading_wav
import numpy as np
PATH = "./PATH/TO/DATASET/DIRECTORY/"
if __name__ == '__main__':
sr, wav_length = properties_of_dataset('./train/')
print('Average SR:', sum(sr)/len(sr))
print('Average WAV Length', sum(wav_length)/len(wav_length), '\n')
print('Lowest SR', min(sr))
print('Lowest WAV Length', min(wav_length), '\n')
print('Highest SR', max(sr))
print('Highest WAV Length', max(wav_length))
print('Appropriate Steps would be SR * seg_len (Eg: seg_len=5):', 5*sum(sr)/len(sr))
```
OUTPUT:
```console
Average SR: 22050.0
Average WAV Length 56040.84209143458
Lowest SR 22050
Lowest WAV Length 27653
Highest SR 22050
Highest WAV Length 116247
Appropriate Steps would be SR * seg_len (Eg: seg_len=5): 110250.0
```
## Load Dataset:
To load the dataset we will be using the following example code segment.
```python
dataset_x, dataset_y, label_map = loading_dataset('./train/', 110000)
```
Where, dataset_x defines the input and dataset_y defines the respective label identified for it. The label_map gives us a dictionary to map the results to the appropriate labels.
## Contributions:
Contributions are welcome on this repository, if you are willing to submit or push any proposal please check out the contributing.md