Skip to content

privet56/speaker-recognition

 
 

Repository files navigation

SPEAKER RECOGNITION with Python 2.7, scikit-learn & Anaconda2

THIS VERSION WORKS ON WINDOWS!

About

This is a Speaker Recognition system with GUI.

Dependencies

  • Windows: Anaconda with Python 2.7
  • scikit-learn (included in Anaconda2)
  • scikits.talkbox (on windows, it needs a VC++ compiler, download "VCForPython27.msi"!)
  • pyssp (command: pip install pyssp)
  • PyQt4 (not needed on windows, as included in Anaconda2)
  • PyAudio (prerequisite on Linux: sudo apt-get install portaudio19-dev)
  • (Optional)Python bindings for bob:
    • install blitz, openblas, boost
    • pip install --user bob.extension bob.blitz bob.core bob.sp bob.ap

Note: We have a MFCC implementation on our own which will be used as a fallback when bob is unavailable. But it's not so efficient as the C implementation in bob.

Compile GMM (Optional)

Run make -C src/gmm to compile our fast gmm implementation. Require gcc >= 4.7.

It will be used as default, if successfully compiled.

For more details of this project, please see:

Algorithms Used

Voice Activity Detection(VAD):

Feature:

Model:

Command Line Tools

usage: speaker-recognition.py [-h] -t TASK -i INPUT -m MODEL

Speaker Recognition Command Line Tool

optional arguments:
  -h, --help            show this help message and exit
  -t TASK, --task TASK  Task to do. Either "enroll" or "predict"
  -i INPUT, --input INPUT
                        Input Files(to predict) or Directories(to enroll)
  -m MODEL, --model MODEL
                        Model file to save(in enroll) or use(in predict)

Wav files in each input directory will be labeled as the basename of the directory.
Note that wildcard inputs should be *quoted*, and they will be sent to glob module.

Examples:
    Train:
    ./speaker-recognition.py -t enroll -i "./bob/ ./mary/ ./person*" -m model.out

    Predict:
    ./speaker-recognition.py -t predict -i "./*.wav" -m model.out

Example:

See 'run.bat' win

GUI Demo

Our GUI not only has basic functionality for recording, enrollment, training and testing, but also has a visualization of real-time speaker recognition:

graph

You can See our demo video (in Chinese). Note that real-time speaker recognition is extremely hard, because we only use corpus of about 1 second length to identify the speaker. Therefore the real-time system doesn't work very perfect. Also the GUI part is quite hacky for demo purpose and may not work as smoothly as expected.

About

A Real-time Speaker Recognition System with GUI, Python 2.7 & scikit-learn, works on Windows

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 63.8%
  • Python 26.2%
  • MATLAB 5.5%
  • Makefile 4.3%
  • Other 0.2%