Giter Club home page Giter Club logo

accentrecognition's Introduction

AccentRecognition

This Repository contains the code for detecting the accent of a speaker with their speech signal. The repository experiments with AESRC2020 Dataset.

Installation

Use the package manager pip to install the required packages for preparing the dataset, training and testing the model.

pip install -r requirements.txt

Usage

Noise Dataset

# Noise Dataset is optional, but recommended
# 1. Download noise Dataset with wavencoder
# 2. Update config.py with the noise_dataset_path = 'folder-to-download-noise-data'

import wavencoder
wavencoder.utils.download_noise_dataset('folder-to-download-noise-data', sample_rate='16k', download_all=True)

Config

Edit the config.py for configurations on data path, lr, batch size, ... etc.
Or you can optionally give as a command line parameters for train and test

Download the dataset

# AESRC2020 Dataset

Prepare the dataset for training and testing(Not Required)

# prepare csv with path to wav files and labels for training
# Train and Test csv files are available at Dataset folder

python prepare_aesrc_data.py --path='path to aesrc wav data folder'

Logger

#Change the logger to Tensorboard or Wandb based on your need in train.py
logger = WandbLogger()
logger = TensorBoardLogger()

Training(Dev Model, to make sure everything is set as expected for training)

python train.py --dev=True 

Training(also check for other arguments in the train.py file)

python train.py 

Test the Model(also check for other arguments in the test.py file)

python test.py  
# Edit config.py for trained model checkpoint
# or add --model_checkpoint='path to saved model checkpoint'

Results

Model Experiment Run Test wav length Test Accuracy
MFCC_1DCNN_LSTM_Attn Wandb Run 3s 0.34078
Mel_Spectrogram_1DCNN_LSTM_Attn Wandb Run 3s 0.3751
wav2vec_LSTM_Attn_CenterLoss (center after attn) Wandb Run 3s 0.6123
4s 0.62008
-1 0.6279
wav2vec_LSTM_Attn_CenterLoss (center before final dense) Wandb Run -1 0.6161
wav2vec_LSTM_Attn_Centerloss_256 (center after Attn) Wandb Run -1 0.6622

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

License

MIT

accentrecognition's People

Contributors

shangeth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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