public class Phone extends Object
Constructor and Description |
---|
Phone(SelectedUnit leftUnit,
SelectedUnit rightUnit,
int sampleRate)
Main constructor
|
Modifier and Type | Method and Description |
---|---|
double[] |
getF0Factors()
Get the F0 factor for each Datagram in this phone's left and right units
|
double[] |
getFrameDurations()
Get the durations (in seconds) of each Datagram in this phone's units
|
double[] |
getFramewiseDurationFactors()
Get the duration factors for this phone, one per datagram.
|
double |
getLeftDurationFactor()
Get the factor to convert this phone's left unit's duration into this phone's left target duration
|
double[] |
getLeftF0Factors()
Get the factors to convert each of the F0 values in this phone's left half to the corresponding target value
|
HalfPhoneTarget |
getLeftTarget()
Get the left halfphone target of this phone
|
double |
getLeftTargetDuration()
Get this phone's left target's duration (in seconds)
|
double[] |
getLeftTargetF0Values()
Get the target F0 values for this phone's left half, with one value per Datagram in the phone's left unit
|
SelectedUnit |
getLeftUnit()
Get the left selected halfphone unit of this phone
|
BaseUnitConcatenator.UnitData |
getLeftUnitData()
Get this phone's left unit's UnitData
|
double |
getLeftUnitDuration()
Get this phone's left unit's duration (in seconds)
|
double[] |
getLeftUnitFrameDurations()
Get the durations (in seconds) of each Datagram in this phone's left unit
|
double[] |
getLeftUnitFrameF0s()
Recover the F0 values from this phone's left unit's Datagrams
|
Datagram[] |
getLeftUnitFrames()
Get this phone's left unit's Datagrams
|
Element |
getMaryXMLElement()
get the MaryXML Element corresponding to this Phone's Target
|
int |
getNumberOfFrames()
Get the number of Datagrams in this phone's left and right units
|
int |
getNumberOfLeftUnitFrames()
Get the number of Datagrams in this phone's left unit
|
int |
getNumberOfRightUnitFrames()
Get the number of Datagrams in this phone's right unit
|
double |
getPredictedDuration()
Get the predicted duration of this phone (which is the sum of the left and right target's duration)
|
double |
getPredictedF0()
Get the mean target F0 for this phone
|
double |
getRealizedDuration()
Get the realized duration (in seconds) of this phone (which is the sum of the durations of the left and right units)
|
double |
getRealizedF0()
Get the realized F0 by recovering the F0 from all Datagrams in this phone and computing the mean
|
double[] |
getRealizedFrameDurations()
Get the durations (in seconds) of each Datagram in this phone's left and right units
|
double |
getRightDurationFactor()
Get the factor to convert this phone's right unit's duration into this phone's right target duration
|
double[] |
getRightF0Factors()
Get the factors to convert each of the F0 values in this phone's right half to the corresponding target value
|
HalfPhoneTarget |
getRightTarget()
Get the right halfphone target of this phone
|
double |
getRightTargetDuration()
Get this phone's right target's duration (in seconds)
|
double[] |
getRightTargetF0Values()
Get the target F0 values for this phone's right half, with one value per Datagram in the phone's right unit
|
SelectedUnit |
getRightUnit()
Get the right selected halfphone unit of this phone
|
BaseUnitConcatenator.UnitData |
getRightUnitData()
Get this phone's right unit's UnitData
|
double |
getRightUnitDuration()
Get this phone's right unit's duration (in seconds)
|
double[] |
getRightUnitFrameDurations()
Get the durations (in seconds) of each Datagram in this phone's right unit
|
double[] |
getRightUnitFrameF0s()
Recover the F0 values from this phone's right unit's Datagrams
|
Datagram[] |
getRightUnitFrames()
Get this phone's right unit's Datagrams
|
double[] |
getTargetF0Values()
Get the target F0 values for this phone, with one value per Datagram in the phone's left and right units
|
Datagram[] |
getUnitDataFrames()
Get all Datagrams in this phone's units
|
double[] |
getUnitFrameF0s()
Recover the F0 values from each Datagram in this phone's left and right units
|
boolean |
isTransient()
Determine whether this is a transient phone (i.e.
|
boolean |
isVoiced()
Determine whether this is a voiced phone
|
void |
setLeftTargetF0Values(double[] f0TargetValues)
Set the target F0 values of this phone's left half, with one value per Datagram in the phone's left unit
|
void |
setRightTargetF0Values(double[] f0TargetValues)
Set the target F0 values of this phone's right half, with one value per Datagram in the phone's right unit
|
String |
toString()
for debugging, provide the names of the left and right targets as the string representation of this class
|
public Phone(SelectedUnit leftUnit, SelectedUnit rightUnit, int sampleRate) throws IllegalArgumentException
leftUnit
- which can be nullrightUnit
- which can be nullsampleRate
- of the TimelineReader containing the SelectedUnits, needed to provide duration informationIllegalArgumentException
- if both the left and right units are nullpublic SelectedUnit getLeftUnit()
public SelectedUnit getRightUnit()
public HalfPhoneTarget getLeftTarget()
public HalfPhoneTarget getRightTarget()
public Datagram[] getLeftUnitFrames()
public Datagram[] getRightUnitFrames()
public Datagram[] getUnitDataFrames()
public int getNumberOfLeftUnitFrames()
public int getNumberOfRightUnitFrames()
public int getNumberOfFrames()
public double[] getFrameDurations()
public double getLeftTargetDuration()
public double getRightTargetDuration()
public double getPredictedDuration()
public BaseUnitConcatenator.UnitData getLeftUnitData()
public BaseUnitConcatenator.UnitData getRightUnitData()
public double getLeftUnitDuration()
public double getRightUnitDuration()
public double getRealizedDuration()
public double getLeftDurationFactor()
public double getRightDurationFactor()
public double[] getFramewiseDurationFactors()
public void setLeftTargetF0Values(double[] f0TargetValues) throws IllegalArgumentException
f0TargetValues
- array of target F0 values to assign to the left halfphoneIllegalArgumentException
- if the length of f0TargetValues does not match the number of Datagrams in the phone's left unitpublic void setRightTargetF0Values(double[] f0TargetValues)
f0TargetValues
- array of target F0 values to assign to the right halfphoneIllegalArgumentException
- if the length of f0TargetValues does not match the number of Datagrams in the phone's right unitpublic double[] getLeftTargetF0Values() throws NullPointerException
NullPointerException
- if the target F0 values for the left halfphone are nullpublic double[] getRightTargetF0Values() throws NullPointerException
NullPointerException
- if the target F0 values for the right halfphone are nullpublic double[] getTargetF0Values()
public double getPredictedF0()
public double[] getLeftUnitFrameDurations()
public double[] getRightUnitFrameDurations()
public double[] getRealizedFrameDurations()
public double[] getLeftUnitFrameF0s()
public double[] getRightUnitFrameF0s()
public double[] getUnitFrameF0s()
public double getRealizedF0()
public double[] getLeftF0Factors()
public double[] getRightF0Factors()
public double[] getF0Factors()
public boolean isTransient()
public boolean isVoiced()
public Element getMaryXMLElement()
If both leftTarget and rightTarget are not null, their respective MaryXML Elements should be equal.
Copyright © 2000–2016 DFKI GmbH. All rights reserved.