Skip to content

This is a simple project that uses Pytorch without fingerprint Framework to mimic work of prorams like "Shazam"

Notifications You must be signed in to change notification settings

avelev99/Ambient_Song_Recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Song Recognizer

This project provides a minimal example of training a neural network to recognise short audio clips. It is built on top of PyTorch and torchaudio and exposes a small command line interface for training and prediction.

Features

  • Convert audio files to Mel-spectrograms on the fly
  • Simple convolutional neural network architecture
  • CLI commands for training and live microphone prediction

Installation

  1. Create a virtual environment (optional but recommended)
  2. Install the dependencies
pip install -r requirements.txt

Usage

Training

Place your audio files (e.g. WAV or MP3) in a directory and run:

python main.py train /path/to/audio

The trained model will be saved to song_recognizer.pth.

Prediction

To make a prediction using the microphone run:

python main.py predict

or provide a prerecorded file:

python main.py predict --input_file sample.wav

Project Structure

.
├── song_recognizer
│   ├── __init__.py
│   ├── data.py
│   ├── model.py
│   ├── recognition.py
│   └── train.py
├── main.py
├── requirements.txt
└── README.md

License

MIT

About

This is a simple project that uses Pytorch without fingerprint Framework to mimic work of prorams like "Shazam"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages