Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compare two sound in Android

Tags:

android

Is possible to compare a voice with already recorded voice in the phone.Based on the comparison we can rate like Good, Very Good , Excellent etc. Most closed sound get high rating.

Anybody know is it possible in Android?

Help is highly appreciable.

like image 522
vks Avatar asked Jan 08 '13 10:01

vks


1 Answers

For a general audio processing library I can recommend marsyas. Unfortunately the official home page is currently down.

Marsyas even provides a sample android application. After getting a proper signal analysis framework, you need to analyse your signal. For example, the AimC implementation for marsyas can be used to compare voice.

I recommend installing marsyas on your computer and fiddle with the python example scripts.

For your voice analysis, you could use a network like this:

vqNetwork = ["Series/vqlizer", [
        "AimPZFC/aimpzfc",
        "AimHCL/aimhcl",
        "AimLocalMax/aimlocalmax",
        "AimSAI/aimsai",
        "AimBoxes/aimBoxes",
        "AimVQ/vq",
        "Gain/g",
    ]

This network takes your audio data and transforms it as it would be processed by a human ear. After that it uses vector quantization to reduce the many possible vectors to very specific codebooks with 200 entries. You can then translate the output of the network to readable characters (utf8 for example), which you then can compare using something like string edit distances (e.g. Levenshtein distance).

Another possibility is to use MFCC (Mel Frequency Cepstral Coefficients) for speech recognition which marsyas supports as well and use something, for example Dynamic Time Warping, to compare the outputs. This document describes the process pretty well.

like image 51
nemo Avatar answered Nov 05 '22 03:11

nemo