Dear all,

The download here allows you to verify vText before production use. The download here is free and now has no limit on the number of times the files can be downloaded. You can configure vText to either function as voice password or voice to text by setting the lower limit and upper limit ratio of frequency spectra comparison between the source signal and the input signal. However, vText is primarily designed to function as voice password. To function as voice to text, you need to pre-record each user's voice first for each voice command.

 

 

Installation Procedures for Java:

1. Download Matlab Component Runtime (MCR) for vText for Windows 7

2. The vText_pkg.exe will emerge, double click to run it. This will install the Matlab Component Runtime (MCR), after this  javabuilder.jar will emerge in the installed MCR directory.

 

3. Download vText.jar here for Windows 7. After download, rename vText.zip to vText.jar.
. Then you can start using the 2 jar files, which can be used on any computer without license restriction. The decision to go open source is to enable voice password usage on internet convenient and practical, and also because of the need to contribute to society.

 

4. To achieve a successful comparison within 3 attempts, you may need to design your database to store at least 2 voice samples for each user. These 2 samples must match >= 77% then when in use for comparison, the benchmark should set at 70. This will avoid user frustration and at the same time achieve reliability because at 70% it is easier to pass through and so far tests have shown no 2 voice samples from 2 different users have reached >= 70%. If there is, you can adjust to increase to an optimum value.

 

Note: 5 seconds recording will create 40,000 samples, being 8000Hz * 5s. Each sample has a magnitude derived from complex modulus. These samples represent the frequency spectra of the time domain signals. The recognition or comparison is done on the frequency spectra, therefore you can input your voice signal at anytime within the 5s or 10s.

 

Java Usage Example

 

Java version
1. jdk1.5.0_12

 

Add files to classpath
1. javabuilder.jar
2. vText.jar

 

Import
import com.mathworks.toolbox.javabuilder.*;
import vText.*;
import java.io.File;
import java.net.FileNameMap;
import javax.swing.filechooser.FileSystemView;

 

 

Class Declaration
vTextClass vTText = null; /* Stores VTText instance */
String source = "C:" + File.separator + "wav" + File.separator + "source";
String compare = "C:" + File.separator + "wav" + File.separator + "compare";

String filteredfilename = "C:" + File.separator + "wav" + File.separator + "filtered";
Object[] result = null; /* Stores the result */

 

 

Recording
try
{

    //Start recording your voice only after class instantiation is completed
    vTText = new vTextClass();

     //dataAcq method is for 5 seconds recording

     //dataAcq10s method for 10 seconds recording
    vTText.dataAcq(1, source); 
    System.out.println("Recording completed");
}
catch (Exception e)
{
    System.out.println("Exception: " + e.toString());
}  

 

View wave form
try
{
    vTText.viewWave(1, source);
}
catch (Exception e)
{
    System.out.println("Exception: " + e.toString());

 

 

Auto detect voice input and recognize

double lowerLimit = 0.5; //0.5 for voice password. 0.25 for voice to text
double upperLimit = 1.5; //1.5 for voice password, 1.75 for voice to text
int detectedVoice = 5; //The magnitude level considered as voice input exists
int passMark = 77; //The point level for recognition. Max is 100 for 5s, 200 for 10s 
int maxTry = 10; //autoDetect ends only when maxTry or passMark is reached.
int period = 5; //record and compare period, 5 or 10 seconds. Depends on dataAcq

 

//1 = full (frequency domain), compare all samples. Result = x/100 

//2 = partial (frequency domain), only compare low frequency samples, 1st 20k. Result = x/200 

//3 = partial (frequency domain), only compare low frequency samples, 1st 10k. Result = x/100 

int compareMethod = 3; 

try
{

    result = vText.autoDetect(1, source, new Integer(maxTry), new Double(lowerLimit), new Double 

    (upperLimit), new Integer(detectedVoice), new Integer(passMark), new Integer(period), new

       Integer(compareMethod));
    System.out.println("result=" + result[0].toString());

}
catch (Exception e)
{
    System.out.println("Exception: " + e.toString());

Auto detect voice input and generate wav file


int detectedVoice = 5; //The magnitude level considered as voice input exists
int period = 5; //recording period, 5 or 10 seconds.

 

try
{

    result = vText.autoDetectWrite(1, source, new Integer(detectedVoice),new Integer(period));
    System.out.println("result=" + result[0].toString());

//if result = 1, then  a wav file is generated, else nothing

}
catch (Exception e)
{
    System.out.println("Exception: " + e.toString());


Recognize
try
{
 

      //recognize method is for 5 seconds, result = x/100.

    //recognize10s method for 10 seconds, x/200.

         //recognizePartial method for 5 or 10 seconds for 1st 20k samples, x/100

         //recognizePartial10k method for 5 or 10 seconds for 1st 10k samples, x/100
    result = vTText.recognizePartial10k(1, source, compare, "0.25", "1.75");
    System.out.println("voice to text result=" + result[0].toString() + "/100");
    result = vTText.recognizePartial10k(1, source, compare, "0.5", "1.5");
    System.out.println("voice password result=" + result[0].toString()+ "/100");
}
catch (Exception e)
{
    System.out.println("Exception: " + e.toString());

 

 

Complex Modulus (frequency spectra)
try
{

    result = vTText.complexmodulus(1, source);

      double[][] ret = new double[result.length][];
    ret[0] = (double[])((MWArray)result[0]).getData();
    for (int i = 0; i < 40000; i++)//change to 80000 if 10s, being (8000Hz * 10s)
    {
        System.out.println("magnitude of sample " + (i+1) + " = " + ret[0][i]);
    }   

}
catch (Exception e)
{
    System.out.println("Exception: " + e.toString());
}

 

 

Filtering background noise
try
{
   
vTText.filterbgnoise(1, source, filteredfilename);
    System.out.println("Filter process completed");
}
catch (Exception e)
{
    System.out.println("Exception: " + e.toString());
}

 


All the best to your project. Thank you for choosing vText from Basic Signal Processing Services.


Sincerely,
Andreas Kok

Algorithm Design Researcher

Email: enquiry@basic-signalprocessing.com