Giter VIP home page Giter VIP logo

speech-commands-classification's Introduction

Speech-Commands-Classification

Speech Commands Classification is a project that aims to classify the speech commands from the Speech Commands Dataset using a Convolutional Neural Network (CNN) and a Long Short-Term Memory (LSTM) network. In this project we will use PyTorch to build the CNN to classify the speech commands.

Installation

My recommendation is to install with requirements.txt file.

pip install -r requirements.txt

Some of you probably have different cuda or gpu, so you can install PyTorch with this tool.

Dataset

You can download the new version from here. Extract the dataset in the directory you wish to work in. Split the dataset into train, validation and test sets using the following command:

python main.py --action create_dataset --speech_commands_folder <google-command-folder> --out_path <path to save the splitted data>

You can leave speech_commands_folder and out_path empty to use the default values.

To Transform the dataset from wav files to numpy array files you can use this command:

python main.py --action transform_dataset --dataset <path-to-dataset-folder>

You can leave dataset empty to use the default values.

Architectures

The architectures of the CNN is the following:

Training

If you want to train the CNN you can use the following command:

python main.py --action train --dataset <path-to-dataset-folder> --model_name <'lenet', 'improved_lenet', 'alexnet'>

There are several parameters you can use to train the CNN. You can see them by using the following command:

python main.py --help

Testing

For testing the CNN you can use the following command:

python main.py --action test --dataset <path-to-dataset> --model_checkpoint <path-to-model>

Results

Model Test Accuracy Test Weighted F1
LeNet 81.4% 89.3%
Improved LeNet 90% 94.6%
AlexNet 94% 96.8%

You can see the validation accuracy and F1 for each epoch in the following figures:

Lenet in gray. Improved LeNet in blue. AlexNet in purple.

Validation Accuracy Validation F1

speech-commands-classification's People

Contributors

eitamar-saraf avatar

Stargazers

PEP 8 Speaks 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.