|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectextra.inpro.synthesis.visual.SegmentModel
public class SegmentModel
the data model that can be manipulated by VisualTTS. We support mbrola data (i.e. segments and associated lists of pitch marks) and import from and export to mbrola format.
Nested Class Summary | |
---|---|
static class |
SegmentModel.PitchRange
PitchRange is a simple container for a minimum and maximum pitch. |
static class |
SegmentModel.Segment
A segment of speech, usually a phone/phoneme. |
static class |
SegmentModel.SegmentBoundPitchMark
|
Field Summary | |
---|---|
private SegmentModel.Segment |
activeLabel
one of the segments may be active, meaning that it can be modified by moveRightBoundaryOfActiveLabel, moveAllBoundariesRightOfActiveLabel, ...) |
private PitchMark |
activePitchMark
one of the pitchmarks may be active. |
private java.util.List<SegmentModel.Segment> |
segments
|
Constructor Summary | |
---|---|
SegmentModel(java.util.List<SegmentModel.Segment> segments)
|
Method Summary | |
---|---|
static SegmentModel |
createTestModel()
|
int |
getDuration()
overall duration in milliseconds |
private static java.util.List<java.lang.String> |
getLines(java.io.InputStream is)
|
SegmentModel.PitchRange |
getPitchRange()
|
SegmentModel.Segment |
getPredecessor(SegmentModel.Segment segment)
|
SegmentModel.Segment |
getSegmentAt(int time)
lookup the segment that spans time t (if any) |
java.util.List<SegmentModel.Segment> |
getSegments()
|
SegmentModel.Segment |
getSuccessor(SegmentModel.Segment segment)
|
void |
insertPitchMark(int time,
int pitch)
|
void |
insertSegment(java.lang.String newSegment,
int time)
insert a segment with the given label at a given time. |
void |
moveAllBoundariesRightOfActiveLabel(int newTime)
|
void |
moveRightBoundaryOfActiveLabelTo(int newTime)
|
static SegmentModel |
readFromFile(java.lang.String filename)
create a segment model from an mbrola-formatted file |
static SegmentModel |
readFromMbrolaLines(java.util.List<java.lang.String> lines)
read from a list of lines, which |
static SegmentModel |
readFromStream(java.io.InputStream is)
create a segment model from an mbrola-formatted input stream |
static SegmentModel |
readFromString(java.lang.String mbrola)
|
static void |
remove(SegmentModel.SegmentBoundPitchMark pm)
|
void |
removeSegment(SegmentModel.Segment l)
|
void |
saveToFile(java.io.File file)
|
void |
setActiveLabel(SegmentModel.Segment l)
|
void |
setActivePitchMark(PitchMark pm)
|
void |
setPitchOfActiveMarkTo(float pitch)
|
java.lang.String |
toString()
return the segmentModel in mbrola format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final java.util.List<SegmentModel.Segment> segments
private SegmentModel.Segment activeLabel
private PitchMark activePitchMark
Constructor Detail |
---|
SegmentModel(java.util.List<SegmentModel.Segment> segments)
Method Detail |
---|
public static SegmentModel createTestModel()
public static SegmentModel readFromMbrolaLines(java.util.List<java.lang.String> lines)
public static SegmentModel readFromString(java.lang.String mbrola)
public static SegmentModel readFromStream(java.io.InputStream is)
private static java.util.List<java.lang.String> getLines(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public static SegmentModel readFromFile(java.lang.String filename) throws java.io.IOException
java.io.IOException
public void saveToFile(java.io.File file) throws java.io.IOException
java.io.IOException
public int getDuration()
public void setActiveLabel(SegmentModel.Segment l)
public void moveRightBoundaryOfActiveLabelTo(int newTime)
public void moveAllBoundariesRightOfActiveLabel(int newTime)
public void setActivePitchMark(PitchMark pm)
public void setPitchOfActiveMarkTo(float pitch)
public void insertSegment(java.lang.String newSegment, int time)
public void removeSegment(SegmentModel.Segment l)
public void insertPitchMark(int time, int pitch)
public static void remove(SegmentModel.SegmentBoundPitchMark pm)
public SegmentModel.Segment getPredecessor(SegmentModel.Segment segment)
public SegmentModel.Segment getSuccessor(SegmentModel.Segment segment)
public SegmentModel.Segment getSegmentAt(int time)
public java.util.List<SegmentModel.Segment> getSegments()
public SegmentModel.PitchRange getPitchRange()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |