Giter Site home page Giter Site logo

amanbudhraja / speech-command-recognition Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.02 MB

A machine learning model is trained to determine the word in an audio file

License: MIT License

Python 100.00%
deep-learning-algorithms cnn lstm machine-learning mfcc-features hybrid-model

speech-command-recognition's Introduction

Speech-Command-Recognition

In the past few years there has been a boost in research of machine learning algorithms in the field of audio processing. This has been possible now because of the abundance of audio data available for analysis, specially speech data. This project explores various deep learning algorithms that can be applied to speech processing. In-depth analysis of the feature extraction techniques like Mel-frequency cepstrum coefficients (MFCC), and deep learning algorithms like Convolution Neural Network (CNN), Long short-term memory (LSTM) and hybrid models like CNN + LSTM have been presented. The evaluation of these models have also been provided in the report.

Architecture of CNN



Data preprocessing

  1. The audio signal is converted from a time domain to a frequency domain using FFT.

    Audio signal in time domain,



    Audio signal in frequency domain,



  2. To capture even the small variations, the signal is further coverted to a log-scale,using the formula, M(f) = 1125*Ln(1+ f/700)

  3. This signal is then pass through a Mel-Scale Filterbank,



  4. Discrete Cosine Transform technique is used on the audio data from 26 filters to remove correlated data.

  5. Finally audio data from 13 out of 26 filters are kept the rest are discarded as they do not contain any useful data.

After extracting features the MFCC features were normalized using the min-max technique and one-hot encoding was used for unrelated categorical data.

Results

Models trained with MFCC features,

  • CNN



  • LSTM



  • Hybrid (CNN + LSTM)



Model trained with raw input data

  • CNN



Conclusion

In this project 4 deep neural network models, 2 CNN, 1 LSTM and 1 Hybrid(CNN+LSTM), were trained on speech command dataset, which can classify an audio file based upon the speech command spoken in audio file. From the results provided it can be following can be concluded: -

  • Even after tuning the hyperparameters the models overfit the dataset.
  • Out of all the models CNN+LSTM took the longest time to converge (about 66 epochs) and even then the accuracy of the model was good.
  • CNN model trained with raw audio data performed the best out of all the models, with almost 93% accuracy.
  • If a model needs to be trained on only few speech commands then raw audio data can be used.
  • For models to be trained on speech recognition then probably MFCC and other audio processing techniques should be used so as to decrease training time of the model (raw audio data had more than 1 million trainable parameters for just 4 words and the training time was more than the models trained with MFCC features).

speech-command-recognition's People

Contributors

amanbudhraja avatar

Stargazers

 avatar  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.