Class match

java.lang.Object
  extended by match
All Implemented Interfaces:
Constants

public class match
extends java.lang.Object
implements Constants

match is the search engine of the recognizer


Field Summary
 double[] costRecord
          array to store the associated cost for each template
 int[][] pathRecord
          array to store the best path for each template
 int recogResult
           
 double[] totalCost
          array to store the total cost for the best path of each template
 
Fields inherited from interface Constants
colortable, models, testsignals, words
 
Constructor Summary
match(dtwApplet dtwapp)
          default class constructor
 
Method Summary
 void bestMatch()
          This method is used to recognize and compute the matching path between test signal and each template and find out the template with least cost
 int bestPathLength()
          access method for getting length of the best path
 java.net.URL getAudioFile()
          access method for getting URL of audio file
 java.lang.String getDistanceType()
          access method for getting distance type
 java.net.URL getLpcURL()
          access method for getting lpc URL
 java.net.URL getRawURL()
          access method for getting the raw URL
 lpcData getReference()
          access method for getting the lpcData reference
 lpcData getSignal()
          access method for getting signal
 double getSlope()
          access method to get slope
 void initTemplates()
          method to load in the templates
 boolean lefttorightMatch()
          the major method to compute the matching score between selected test signal and reference.
 void setAudioFile(java.net.URL a)
          access method for setting URL of audio file
 void setDistance(java.lang.String a)
          access method for setting distance type
 void setMenu(MainMenu menu)
          access method for setting main menu
 void setReference(int k)
          access method for setting the reference with an index
 void setReference(java.net.URL url)
          access method for setting the reference with URL
 void setRefIndex(int a)
          access method for set reference index
 void setSignal(int k)
          correct the datapath to match each case of speech sound
 void setSignal(java.net.URL url)
          access method for setting the signal with a URL
 void setSlope(double a)
          access method to set slope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

recogResult

public int recogResult

pathRecord

public int[][] pathRecord
array to store the best path for each template


costRecord

public double[] costRecord
array to store the associated cost for each template


totalCost

public double[] totalCost
array to store the total cost for the best path of each template

Constructor Detail

match

public match(dtwApplet dtwapp)
default class constructor

Parameters:
dtwapp - applet object instantiated
Method Detail

initTemplates

public void initTemplates()
method to load in the templates

Throws:
java.net.MalformedURLException - if applet codebase cannot be initilized

setSlope

public void setSlope(double a)
access method to set slope

Parameters:
a - double value of slope to be set

getSlope

public double getSlope()
access method to get slope

Returns:
slope value

setDistance

public void setDistance(java.lang.String a)
access method for setting distance type

Parameters:
a - String value of distance type to be set

getDistanceType

public java.lang.String getDistanceType()
access method for getting distance type

Returns:
distance type value

bestPathLength

public int bestPathLength()
access method for getting length of the best path

Returns:
best path length

setRefIndex

public void setRefIndex(int a)
access method for set reference index

Parameters:
a - index to set

getSignal

public lpcData getSignal()
access method for getting signal

Returns:
current signal

getLpcURL

public java.net.URL getLpcURL()
access method for getting lpc URL

Returns:
URL for the lpc

getRawURL

public java.net.URL getRawURL()
access method for getting the raw URL

Returns:
raw URL

getAudioFile

public java.net.URL getAudioFile()
access method for getting URL of audio file

Returns:
URL of audio file

setAudioFile

public void setAudioFile(java.net.URL a)
access method for setting URL of audio file

Parameters:
a - URL to set

getReference

public lpcData getReference()
access method for getting the lpcData reference

Returns:
reference of lpcData type

setReference

public void setReference(java.net.URL url)
access method for setting the reference with URL

Parameters:
url - URL of reference to set

setReference

public void setReference(int k)
access method for setting the reference with an index

Parameters:
k - integer value of index to template array

setSignal

public void setSignal(java.net.URL url)
access method for setting the signal with a URL

Parameters:
url - URL of signal

setSignal

public void setSignal(int k)
correct the datapath to match each case of speech sound

Parameters:
k - index of signal to set

lefttorightMatch

public boolean lefttorightMatch()
the major method to compute the matching score between selected test signal and reference.

Returns:
if success, return true, else return false

bestMatch

public void bestMatch()
This method is used to recognize and compute the matching path between test signal and each template and find out the template with least cost


setMenu

public void setMenu(MainMenu menu)
access method for setting main menu

Parameters:
menu - MainMenu object to set