Speaker recognition library based on MARF for raspberry pi and other SBCs.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 27956d2 Jan 16, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs update gender detection tutorial Oct 26, 2016
examples add batch train example Jan 12, 2018
piwho Update recognition.py Jan 16, 2018
tests feature option changed in tests Oct 22, 2016
.travis.yml add python 3.6 in CI Jan 12, 2018
CHANGELOG.rst update CHANGELOG Jan 12, 2018
LICENSE MIT Jul 20, 2016
MANIFEST.in update MANIFEST Jan 12, 2018
NOTICE MARF LICENSE Jul 20, 2016
README.rst update README Jan 12, 2018
requirements.txt dependencies Jul 20, 2016
setup.py Add Python version 3.6 to setup classifiers Jan 12, 2018

README.rst

Piwho

Piwho is python wrapper around MARF speaker recognition framework for the Raspberry pi and other SBCs. With the Piwho you can implement speaker recognition in your projects.

https://travis-ci.org/Adirockzz95/Piwho.svg?branch=v1.3.0

Blink example

import RPi.GPIO as GPIO
import time
from piwho import recognition, vad

def blink(pin):
    GPIO.setmode(GPIO.BOARD)
    GPIO.setup(pin, GPIO.OUT)

    for i in range(0,10):
        GPIO.output(pin,GPIO.HIGH)
        time.sleep(1)
        GPIO.output(pin,GPIO.LOW)
        time.sleep(1)

if __name__ == "__main__":
   recog = recognition.SpeakerRecognizer('./')
   vad.record()
   name = recog.identify_speaker()
   if name[0] == 'Abhishek':
       blink(11)

Tested on

  • Ubuntu 15.10
  • Pi 1 model B (raspbian wheezy, jessie)
  • Pi 2 model B (raspbian wheezy, jessie, stretch)
  • CHIP

Installation

Update the Pi

$ sudo apt-get update
$ sudo apt-get upgrade

You need to have JDK (min version: 1.7) installed on your Pi.

# verify jdk is installed
$ java -version

Pyaudio is required to run audio recording script. (Optional)

# Install portaudio
$ sudo apt-get install portaudio19-dev
# Install python dev package
$ sudo apt-get install python2.7-dev
# Install pyaudio
$ pip install pyaudio

Piwho is on PyPI

$ pip install piwho

or clone the project from github

$ git clone https://www.github.com/Adirockzz95/Piwho.git
$ cd Piwho
$ python setup.py install

Tests

Tests are implemented using unittest framework:

$ pip install -r requirements.txt
$ python -m unittest discover -v ./tests

Documentation

Tips / Caveats

  • Recognition/Training time depends on the length of an audio file.
  • If possible overclock your Pi- use Turbo mode.
  • Give maxmium RAM to CPU.
  • Read MARF manual to know how the it works.
  • Recognition speed is directly proportional to the CPU power.

Misc

Here are resources/similar projects I came across while working on this project.

LICENSE

MIT