Giter VIP home page Giter VIP logo

native-classifier's Introduction

NativeClassifier

Project Structure

  • dataset_wav --- the corpus of audio .wav files of spoken urdu words

  • dataset_java_feature --- files saved with extracted MFCCs features using the librosa java implementation. MFCCs are saved in seperate text files with the same name as the audio file for each audio later to be used for comparison with the librosa python generated MFCCs.

  • librosa/librosa_java --- the java implementation for librosa. Reads the audio .wav files to extract MFCCs and saves them in seperate text files for each audio.

  • librosa/librosa_python --- python librosa code to extract MFCCs from .wav audio

  • mfcc --- code for extracting features using python_speech_features library (wav2mfcc.py) & using librosa library (wav2mfcc_librosa.py)

  • model --- code for LSTM Model for classification of native and non-native speakers (native_classifier.py)

  • compare --- code to compare MFCCs generated from python librosa and java librosa using RMSE aand generate graph for visualization

  • Others --- contains potential code for feature extraction using java (eg. OpenIMAJ library) from other different libraries that were tried in the study.

  • utilities --- Creating Wav audio object in python ( data_loader.py )

  • train_model.py --- train model using MFCCs extracted using python librosa

  • train_model_librosa.py --- train model using MFCCs extracted using librosa java implementation

  • sib_app --- Android application

Information about the dataset

https://www.kaggle.com/hazrat/urdu-speech-dataset

Requirements

  • Create a virtual environment
virtualenv env
  • Install all the requirements in the virtual environment
source env/bin/activate
pip3 install -r requirements.txt

Train the model

  • Run the script that trains the librosa model
source env/bin/activate
python train_model_librosa.py

Load the model inside a Python script

  • Add these lines to your Python script
from keras.models import load_model

model = load_model('model.h5')
model.summary()

Generate cumulative distribution of the RMSE of the two librosa implementations

  • Run the script that compares the two implementations
source env/bin/activate
cd compare
PYTHONPATH=../ python compare_output.py

native-classifier's People

Contributors

matteope avatar mmushtaq201 avatar slucsnrg avatar bardiaalavi-2020 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.