marytts.tools.voiceimport
Class SnackVoiceQualityProcessor

java.lang.Object
  extended by marytts.tools.voiceimport.VoiceImportComponent
      extended by marytts.tools.voiceimport.SnackVoiceQualityProcessor

public class SnackVoiceQualityProcessor
extends VoiceImportComponent


Field Summary
protected  DatabaseLayout db
           
 java.lang.String FFTSIZE
           
 java.lang.String FRAMELENGTH
           
 java.lang.String LPCORDER
           
 java.lang.String MAXPITCH
           
 java.lang.String MINPITCH
           
 java.lang.String NUMFORMANTS
           
 java.lang.String SAMPLINGRATE
           
protected  java.lang.String scriptFileName
           
protected  java.lang.String snackExtension
           
protected  java.lang.String voiceQualityExtension
           
 java.lang.String VQDIR
           
 java.lang.String WINDOWLENGTH
           
 
Fields inherited from class marytts.tools.voiceimport.VoiceImportComponent
bnl, logger, props, props2Help
 
Constructor Summary
SnackVoiceQualityProcessor()
           
 
Method Summary
 void calculateVoiceQuality(double[][] snack, int samplingRate, int frameLength, int windowLength, WavReader sound, Window hammWin, double[][] barkMatrix, int fftSize, VoiceQuality vq, boolean debug)
           
 boolean compute()
          The standard compute() method of the VoiceImportComponent interface.
 int findClosestHarmonicPeak(double[] peaks, double f, int maxFreqIndex)
          returns the index where the closset harmonic peak to f is found
 java.util.SortedMap getDefaultProps(DatabaseLayout db)
          Get the map of properties2values containing the default values
 java.lang.String getName()
          Get the name of this component
 int getProgress()
          Provide the progress of computation, in percent, or -1 if that feature is not implemented.
 void initialiseComp()
          Initialise a voice import component: component specific initialisation; to be overwritten by subclasses
static void main(java.lang.String[] args)
           
static void main1(java.lang.String[] args)
           
static void main2(java.lang.String[] args)
           
static void main3(java.lang.String[] args)
           
static void main4(java.lang.String[] args)
           
static void main5(java.lang.String[] args)
           
protected  void setupHelp()
           
 double vocalTractCompensation(double freq, double formant, double bandWidth)
          Compensation of the vocal tract influence
 
Methods inherited from class marytts.tools.voiceimport.VoiceImportComponent
getHelpText, getHelpTextForProp, getProp, initialise, setProp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

db

protected DatabaseLayout db

snackExtension

protected java.lang.String snackExtension

voiceQualityExtension

protected java.lang.String voiceQualityExtension

scriptFileName

protected java.lang.String scriptFileName

SAMPLINGRATE

public final java.lang.String SAMPLINGRATE
See Also:
Constant Field Values

MINPITCH

public final java.lang.String MINPITCH
See Also:
Constant Field Values

MAXPITCH

public final java.lang.String MAXPITCH
See Also:
Constant Field Values

FRAMELENGTH

public final java.lang.String FRAMELENGTH
See Also:
Constant Field Values

WINDOWLENGTH

public final java.lang.String WINDOWLENGTH
See Also:
Constant Field Values

NUMFORMANTS

public final java.lang.String NUMFORMANTS
See Also:
Constant Field Values

LPCORDER

public final java.lang.String LPCORDER
See Also:
Constant Field Values

FFTSIZE

public final java.lang.String FFTSIZE
See Also:
Constant Field Values

VQDIR

public final java.lang.String VQDIR
See Also:
Constant Field Values
Constructor Detail

SnackVoiceQualityProcessor

public SnackVoiceQualityProcessor()
Method Detail

setupHelp

protected void setupHelp()
Specified by:
setupHelp in class VoiceImportComponent

getName

public final java.lang.String getName()
Description copied from class: VoiceImportComponent
Get the name of this component

Specified by:
getName in class VoiceImportComponent
Returns:
the name

initialiseComp

public void initialiseComp()
Description copied from class: VoiceImportComponent
Initialise a voice import component: component specific initialisation; to be overwritten by subclasses

Overrides:
initialiseComp in class VoiceImportComponent

getDefaultProps

public java.util.SortedMap getDefaultProps(DatabaseLayout db)
Description copied from class: VoiceImportComponent
Get the map of properties2values containing the default values

Specified by:
getDefaultProps in class VoiceImportComponent
Returns:
map of props2values

compute

public boolean compute()
                throws java.lang.Exception
The standard compute() method of the VoiceImportComponent interface.

Specified by:
compute in class VoiceImportComponent
Returns:
true on success, false on failure
Throws:
java.lang.Exception

calculateVoiceQuality

public void calculateVoiceQuality(double[][] snack,
                                  int samplingRate,
                                  int frameLength,
                                  int windowLength,
                                  WavReader sound,
                                  Window hammWin,
                                  double[][] barkMatrix,
                                  int fftSize,
                                  VoiceQuality vq,
                                  boolean debug)
                           throws java.lang.Exception
Parameters:
snack: - array containing f0+formants+band widths
frameLength: - in samples
windowLength: - in samples
sound -
Throws:
java.lang.Exception

findClosestHarmonicPeak

public int findClosestHarmonicPeak(double[] peaks,
                                   double f,
                                   int maxFreqIndex)
returns the index where the closset harmonic peak to f is found

Returns:

vocalTractCompensation

public double vocalTractCompensation(double freq,
                                     double formant,
                                     double bandWidth)
Compensation of the vocal tract influence

Parameters:
freq -
formant -
bandWidth -
Returns:

getProgress

public int getProgress()
Provide the progress of computation, in percent, or -1 if that feature is not implemented.

Specified by:
getProgress in class VoiceImportComponent
Returns:
-1 if not implemented, or an integer between 0 and 100.

main3

public static void main3(java.lang.String[] args)
                  throws java.lang.Exception
Throws:
java.lang.Exception

main2

public static void main2(java.lang.String[] args)
                  throws java.lang.Exception
Throws:
java.lang.Exception

main1

public static void main1(java.lang.String[] args)
                  throws java.lang.Exception
Throws:
java.lang.Exception

main4

public static void main4(java.lang.String[] args)
                  throws java.lang.Exception
Throws:
java.lang.Exception

main5

public static void main5(java.lang.String[] args)
                  throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception