Skip to content

bedangSen/VoiceSens

Repository files navigation

VoiceSens - Adding Voice Biometrics to your Application

VoiceSens is a text independent voice biometric solution 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 Watson Speech to Text (speech recognition).

Table of Content

Getting Started

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

  1. Install and set up Python 3.

  2. Sign up for an IBM Cloud account.

  3. Create an instance of the Speech to Text service and get your credentials:

    • Go to the Speech to Text page in the IBM Cloud Catalog.
    • Log in to your IBM Cloud account.
    • Click Create.
    • Click Show to view the service credentials.
    • Copy the iam_apikey and url values.

Configuring the application

  1. Open the sample_config.py file and change the username and password for the text to speech service. Then rename the file to config.py
APIKEY = "APIKEY"  
URL = "URL"  

Running locally

  1. Clone the repository.

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

    cd VoiceSens
    
  3. (Optional) Running it in a virtual environment.

    1. Downloading and installing virtualenv.
    pip install virtualenv
    
    1. Create the virtual environment in Python 3.
     virtualenv -p path\to\your\python.exe test_env
    
    1. Activate the test environment.

      1. For Windows:
      test_env\Scripts\Activate
      
      1. For Unix:
      source test_env/bin/activate
      
  4. Install all the required libraries, by installing the requirements.txt file.

    pip install -r requirements.txt
    
  5. Run the application.

    python voice.py
    
  6. Go to http:https://localhost: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

  • IBM Watson Speech to Text - 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.
  • Random Words - This is a simple python package to generate random english words.
  • Skitlearn Gaussian Mixture Models - sklearn.mixture is a package which enables one to learn Gaussian Mixture Models

References

To Do

  • Hashing the audio files and signing it with the clients private key, to prevent man in the middle attacks.
  • Improve the accuracy of the GMM model.
  • Add solution architecture.
  • Storing the models in a secure Object storage