Skip to content

LuckyHouse/SpeechGenderRecognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpeechGenderRecognition

This model recognizes gender by analyzing real call recording. It is a Keras implementation of a CNN&LSTM which predict long audio with short audio.

Dependencies

  • Python3.6+
  • Keras2.3
  • scipy, numpy, Pandas, pyAudioAnalysis, pydub, h5py
  • Webrtcvad2.0.10
  • Sklearn

Data

Generate short audio by:

generate_sample.py

It will generate short audio from long audio by VAD(Voice Activity Detection),then you need to label them and put them in three folders.

Train data files:

├── ...
├── data
│   ├── long_audio          #wav files before VAD
│   ├── model                  #save model
│   └── short_audio         #wav files after VAD
│──────├── female          # wav files with label female
│──────├── male          #  wav files with label male
│──────└── noise          # wav files with label noise
└── ...

Train

  • Set train=true in:
	main.py
  • It will create feature and label data at first time:
	x.npy y.npy label.txt
  • If you use your own data, please delete them first.

Predict

  • Set train=false and model_path in:
	main.py

Accuracy

gender precision recall
female 0.896 0.89
male 0.909 0.871

Thanks

Releases

No releases published

Packages

No packages published

Languages