public class SnackVoiceQualityProcessor extends VoiceImportComponent
Modifier and Type | Field and Description |
---|---|
protected DatabaseLayout |
db |
String |
FFTSIZE |
String |
FRAMELENGTH |
String |
LPCORDER |
String |
MAXPITCH |
String |
MINPITCH |
String |
NUMFORMANTS |
String |
SAMPLINGRATE |
protected String |
scriptFileName |
protected String |
snackExtension |
protected String |
voiceQualityExtension |
String |
VQDIR |
String |
WINDOWLENGTH |
bnl, logger, props, props2Help
Constructor and Description |
---|
SnackVoiceQualityProcessor() |
Modifier and Type | Method and Description |
---|---|
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
|
SortedMap |
getDefaultProps(DatabaseLayout db)
Get the map of properties2values containing the default values
|
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.
|
protected void |
initialiseComp()
Initialise a voice import component: component specific initialisation; to be overwritten by subclasses
|
static void |
main(String[] args) |
static void |
main1(String[] args) |
static void |
main2(String[] args) |
static void |
main3(String[] args) |
static void |
main4(String[] args) |
static void |
main5(String[] args) |
protected void |
setupHelp() |
double |
vocalTractCompensation(double freq,
double formant,
double bandWidth)
Compensation of the vocal tract influence
|
getHelpText, getHelpTextForProp, getProp, initialise, setProp
protected DatabaseLayout db
protected String snackExtension
protected String voiceQualityExtension
protected String scriptFileName
public final String SAMPLINGRATE
public final String MINPITCH
public final String MAXPITCH
public final String FRAMELENGTH
public final String WINDOWLENGTH
public final String NUMFORMANTS
public final String LPCORDER
public final String FFTSIZE
public final String VQDIR
protected void setupHelp()
setupHelp
in class VoiceImportComponent
public final String getName()
VoiceImportComponent
getName
in class VoiceImportComponent
protected void initialiseComp()
VoiceImportComponent
initialiseComp
in class VoiceImportComponent
public SortedMap getDefaultProps(DatabaseLayout db)
VoiceImportComponent
getDefaultProps
in class VoiceImportComponent
db
- dbpublic boolean compute() throws Exception
compute
in class VoiceImportComponent
Exception
- Exceptionpublic void calculateVoiceQuality(double[][] snack, int samplingRate, int frameLength, int windowLength, WavReader sound, Window hammWin, double[][] barkMatrix, int fftSize, VoiceQuality vq, boolean debug) throws Exception
snack
- : array containing f0+formants+band widthssamplingRate
- samplingRateframeLength
- : in sampleswindowLength
- : in samplessound
- soundhammWin
- hammWinbarkMatrix
- barkMatrixfftSize
- fftSizevq
- vqdebug
- debugException
- Exceptionpublic int findClosestHarmonicPeak(double[] peaks, double f, int maxFreqIndex)
peaks
- peaksf
- fmaxFreqIndex
- maxFreqIndexpublic double vocalTractCompensation(double freq, double formant, double bandWidth)
freq
- freqformant
- formantbandWidth
- bandWidthpublic int getProgress()
getProgress
in class VoiceImportComponent
Copyright © 2000–2016 DFKI GmbH. All rights reserved.