Code Monkey home page Code Monkey logo

gender-classification's Introduction

Gender-Classification with PyTorch

Gender Classification of Speech Signals

Notes

This project aims to classify gender of the speaker using neural network model.

Usage

First, required dependencies should be installed:

environment.yml => dependencies

Second step is preparing data:

I've used sub set of the VCTK clean speech databases consist of equal number of female and male English speakers. Database can be found here: https://datashare.is.ed.ac.uk/handle/10283/1942

Dataset should be under 'dataset/' folder in the same dir. If not, paths in scripts should be corrected accordingly. In order to have larger datasets, I've used noisy and reverberant versions of the clean speech dataset. You can use the following scripts to prepare required datas.

dataset.py => Resample dataset files to 8 kHz

testset.py => Picks randomly 100 samples from dataset and moves to 'testset/'.

bg_noise_generator.py => Download random background noises from YouTube using Google Audioset. For more info: https://research.google.com/audioset/index.html

noise.py => This file copies samples from dataset, adds noise and saves under 'noise/'

revb.mat => This file copies samples from dataset, adds reverberation and saves under 'revb/'

Third step is training Network:

model/GenderClassifierModel.py => Defines the model

data.py => Controls flow of data

stopping.py => Early Stoppping callback

trainer.py => Controls the training steps

train.py => Defines model and trains the network for given parameters

Running train.py will train the network and save model checkpoints.

Last step is the testing:

test.py => Tests every sample in testset and saves estimations with confidence levels into a csv file.

With provided pre-trained model, I get approximately %97 percent accuracy.

gender-classification's People

Contributors

kubicndmr avatar

Stargazers

 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.