public class VocalizationUnitFileReader extends Object
| Constructor and Description |
|---|
VocalizationUnitFileReader()
Empty constructor; need to call load() separately.
|
VocalizationUnitFileReader(String fileName)
Create a unit file reader from the given unit file
|
| Modifier and Type | Method and Description |
|---|---|
VocalizationUnit |
getNextUnit(VocalizationUnit u)
Return the unit following the given unit in the original database.
|
int |
getNumberOfUnits()
Get the number of units in the file.
|
VocalizationUnit |
getPreviousUnit(VocalizationUnit u)
Return the unit preceding the given unit in the original database.
|
int |
getSampleRate()
Get the sample rate of the file.
|
VocalizationUnit |
getUnit(int i)
Return the unit number i.
|
VocalizationUnit[] |
getUnit(int[] i)
Return an array of units from their indexes.
|
boolean |
isEdgeUnit(int i)
Determine whether the unit number i is an "edge" unit, i.e.
|
void |
load(String fileName)
Load the given unit file
|
static void |
main(String[] args) |
public VocalizationUnitFileReader()
load(String)public VocalizationUnitFileReader(String fileName) throws IOException, MaryConfigurationException
fileName - the unit file to readIOException - if a problem occurs while readingMaryConfigurationException - MaryConfigurationExceptionpublic void load(String fileName) throws IOException, MaryConfigurationException
fileName - the unit file to readIOException - if a problem occurs while readingMaryConfigurationException - MaryConfigurationExceptionpublic int getNumberOfUnits()
public int getSampleRate()
public VocalizationUnit getUnit(int i)
i - The index of the considered unit.public VocalizationUnit[] getUnit(int[] i)
i - The indexes of the considered units.public VocalizationUnit getNextUnit(VocalizationUnit u)
u - a unitpublic VocalizationUnit getPreviousUnit(VocalizationUnit u)
u - a unitpublic boolean isEdgeUnit(int i)
i - The index of the considered unit.Copyright © 2000–2016 DFKI GmbH. All rights reserved.