Code Monkey home page Code Monkey logo

audio-classifier's Introduction

Audio-classifier

A python module for generating audio classifiers using Sklearn and Librosa. It can be used to predict various audio labels given its features extracted using STFT embeddings.

Requirements

  • Python 3.X (Only tested in 3.6)
  • Librosa
  • Scikit-sklearn
  • Matplotlib (For tests)

Install

To install this package, simply type:

pip install librosa -U
pip install scikit-learn -U
git clone https://github.com/pabletos/Audio-classifier.git

How to use

There's no available documentation already (Coming SOON™) but you can use test_1 definition in test.pyto generate any classifier or use this as a basic template:

from classifier import extractor as ex
from classifier import trainer as tr
from classifier.utils import *

# Data folder must contain one folder per label, named as the label, containing their audios
DATA_PATH = "your//absolute//path//to//data//folder"

if __name__ == "__main__":
	dataset = ex.generate_dataset(DATA_PATH)
	plain_dataset = [(X, y) for y in dataset for X in dataset[y]]
	X, y = zip(*plain_dataset)

	# This creates the classifier as well as dumping it with pickle
	clf = tr.create_classifier(classifier, X, y)

License

This project is under MIT license, you can review it at the LICENSE included file in this repo.

Authors

audio-classifier's People

Contributors

pabletos avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.