Skip to content

D4ve-R/SincNet

Repository files navigation

SincNet

SincNet Model for audio feature extraction

📄 Paper: Speaker Recognition from Raw Waveform with SincNet

🤗 HuggingFace: D4ve-R/sincnet

Pure pytorch implementation of the SincNet model for audio feature extraction. The model is implemented in src/models/sincnet. Used as a feature extractor for many audio classification task.

Usage

from source

pip install -r requirements.txt
import torch
from src.models.sincnet import SincNet

# Create a SincNet model
sincnet = SincNet()
# Forward pass
y = sincnet(torch.randn(1, 1, 16000))

from huggingface

pip install transformers
from transformers import AutoModel
sincnet = AutoModel.from_pretrained("D4ve-R/sincnet")
# Forward pass
y = sincnet(torch.randn(1, 1, 16000))

Project Organization

├── LICENSE
├── Makefile           <- Makefile with commands like `make data` or `make train`
├── README.md          <- The top-level README for developers using this project.
│
├── docs               <- A default Sphinx project; see sphinx-doc.org for details
│
├── models             <- Trained and serialized models, model predictions, or model summaries
│
├── notebooks          <- Jupyter notebooks. Naming convention is a number (for ordering),
│                         the creator's initials, and a short `-` delimited description, e.g.
│                         `1.0-jqp-initial-data-exploration`.
│
├── requirements.txt   <- The requirements file for reproducing the analysis environment, e.g.
│                         generated with `pip freeze > requirements.txt`
│
├── setup.py           <- makes project pip installable (pip install -e .) so src can be imported
├── src                <- Source code for use in this project.
│   ├── __init__.py    <- Makes src a Python module
│   │
│   ├── data           <- Scripts to download or generate data
│   │   └── make_dataset.py
│   │
│   ├── features       <- Scripts to turn raw data into features for modeling
│   │   └── build_features.py
│   │
│   ├── models         <- Scripts to train models and then use trained models to make
│   │   │                 predictions
│   │   ├── predict_model.py
│   │   └── train_model.py
│   │
│   └── visualization  <- Scripts to create exploratory and results oriented visualizations
│       └── visualize.py
│
└── tox.ini            <- tox file with settings for running tox; see tox.readthedocs.io

Project based on the cookiecutter data science project template. #cookiecutterdatascience