项目作者: LuckyHouse

项目描述 :
Recognize call recordings gender
高级语言: Python
项目地址: git://github.com/LuckyHouse/SpeechGenderRecognition.git
创建时间: 2019-11-08T06:26:48Z
项目社区:https://github.com/LuckyHouse/SpeechGenderRecognition

开源协议:MIT License

下载


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:

  1. 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:

  1. ├── ...
  2. ├── data
  3. ├── long_audio #wav files before VAD
  4. ├── model #save model
  5. └── short_audio #wav files after VAD
  6. │──────├── female # wav files with label female
  7. │──────├── male # wav files with label male
  8. │──────└── noise # wav files with label noise
  9. └── ...

Train

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

Predict

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

Accuracy

gender precision recall
female 0.896 0.89
male 0.909 0.871

Thanks