/VoiceSens

A Voice Biometric Application using Watson Speech to Text

Primary LanguageJavaScriptApache License 2.0Apache-2.0

VoiceSens - Adding Voice Biometrics to your Application - fork of script for internet server an SpeechPro ASR with Russian Language

VoiceSens is a text independent voice biometric solution by https://github.com/bedangSen developed to combat some of the shortcomings of standard authentication techniques like passwords and pincodes, as well as current available voice biometric solutions. The solution is developed in Python and uses SpeechPro ASR (speech recognition).

Table of Content

Getting Started

These instructions will get you a copy of the project up and running on your web server for development and testing purposes.

  1. install SpeechPro asr service

    git clone https://github.com/STC-VoiceKey/stc-speechkit-python.git
    
  2. register to recieve credintials for ASR and other services here https://cp.speechpro.com/doc/asr#

  3. install requirements and library

    cd stc-speechkit-python/asr
    pip3 install -r requirements.txt
    sudo python3 setup.py install
    

Configuring the application

  1. Open the sample_config.py file and change the username, password and domain for the text to speech service. Then rename the file to config.py
LOGIN = "your login to SpeechPro"
SERVER = domain
PASSWORD = "password to speechpro"  

Running on server (Ubuntu 18.04 minimal used under python3)

  1. Clone the repository.

    git clone https://github.com/toborobot/VoiceSens.git
    
  2. Move into the project directory.

    cd VoiceSens
    
  3. install pip

    sudo apt-get install python3-pip
    
  4. Install all the required libraries, by installing the requirements.txt file.

    pip3 install -r requirements.txt --user
    
  5. install tkinter

    sudo apt-get install python3-tk
    
  6. add openssl to server to enable microphone in browser

    pip3 install pyopenssl
    
  7. edit voice.py to add ssl support to flask (389-390 lines)

    if __name__ == '__main__':
     app.run(host='0.0.0.0', port=PORT, debug=True, ssl_context='adhoc')
    
  8. Run the application.

    python3 voice.py
    
  9. Go to https://your_internet_addres_here:8080

Demo

1. VoiceSens Homepage



The first thing that you see when you open the web page are two options:

  1. Enroll a new user
  2. Authenticate an existing user

2. Enrollment Page



If you haven't created a voice sample, the first step is to create an account and enroll your voice samples. The model then generates a voice print on the voice samples provided.

3. Authentication Page

Once you have created an account, you can authenticate yourself by recording a voice sample, generating a voice print, and then comparing the voice print to the voice prints in the database

4. Voice Biometrics Page

When you record your voice sample, the first thing you do is record the environmental sound. This creates a baseline for noise in the following recording, increasing the accuracy of your results. Once you are done with that you can proceed with reciting the randomly generated words. If the fuzzy matching ratio between the generated words and recognised words is less than 65, the recorded voice phrase will not be accepted, and you will be asked to record your voice sample again.

Key Components

  • SpeechPro ASR - The Speech to Text Service used.
  • Scipy - SciPy is a Python-based ecosystem of open-source software for mathematics, science, and engineering.
  • Speech Recognition - Library for performing speech recognition, with support for several engines and APIs, online and offline.
  • Python Speech Features - This library provides common speech features for ASR including MFCCs and filterbank energies.
  • Fuzzy Wuzzy - Fuzzy string matching like a boss. It uses Levenshtein Distance to calculate the differences between sequences in a simple-to-use package.
  • Skitlearn Gaussian Mixture Models - sklearn.mixture is a package which enables one to learn Gaussian Mixture Models

References

To Do

  • make authentification