extra.inpro.synthesis.visual
Class SegmentModel.Segment

java.lang.Object
  extended by extra.inpro.synthesis.visual.SegmentModel.Segment
Enclosing class:
SegmentModel

public static class SegmentModel.Segment
extends java.lang.Object

A segment of speech, usually a phone/phoneme. Segments have a label, a start and duration, and may contain zero or more pitch marks


Field Summary
private  int duration
           
private  java.lang.String label
           
private  java.util.List<SegmentModel.SegmentBoundPitchMark> pitchMarks
           
private  int startTime
           
 
Constructor Summary
SegmentModel.Segment(java.lang.String labelText, int startTime, int duration)
           
SegmentModel.Segment(java.lang.String label, int startTime, int duration, java.util.List<PitchMark> pms)
           
 
Method Summary
 void addPitchMark(int time, int pitch)
           
 int getCenter()
           
 int getDuration()
           
 int getEndTime()
           
 int getMaximumPitch()
           
 int getMinimumPitch()
           
 java.util.List<SegmentModel.SegmentBoundPitchMark> getPitchMarks()
          return an unmodifiable view of the pitch marks
 int getStartTime()
           
 java.lang.String getText()
           
 void removePitchMark(PitchMark pm)
           
private  void setLeftBoundaryTo(int startTime)
          set the left boundary, leaving the right boundary alone (i.e. adapting duration)
private  void setRightBoundaryTo(int endTime)
          set the right boundary, leaving the left boundary alone (i.e. change duration)
 void setText(java.lang.String labelText)
           
 java.lang.String toString()
          return the segment and its pitchmarks in mbrola format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

label

private java.lang.String label

startTime

private int startTime

duration

private int duration

pitchMarks

private java.util.List<SegmentModel.SegmentBoundPitchMark> pitchMarks
Constructor Detail

SegmentModel.Segment

public SegmentModel.Segment(java.lang.String label,
                            int startTime,
                            int duration,
                            java.util.List<PitchMark> pms)

SegmentModel.Segment

public SegmentModel.Segment(java.lang.String labelText,
                            int startTime,
                            int duration)
Method Detail

getText

public java.lang.String getText()

getStartTime

public int getStartTime()

getEndTime

public int getEndTime()

getCenter

public int getCenter()

getDuration

public int getDuration()

setLeftBoundaryTo

private void setLeftBoundaryTo(int startTime)
set the left boundary, leaving the right boundary alone (i.e. adapting duration)


setRightBoundaryTo

private void setRightBoundaryTo(int endTime)
set the right boundary, leaving the left boundary alone (i.e. change duration)


setText

public void setText(java.lang.String labelText)

getPitchMarks

public java.util.List<SegmentModel.SegmentBoundPitchMark> getPitchMarks()
return an unmodifiable view of the pitch marks


removePitchMark

public void removePitchMark(PitchMark pm)

addPitchMark

public void addPitchMark(int time,
                         int pitch)

getMinimumPitch

public int getMinimumPitch()

getMaximumPitch

public int getMaximumPitch()

toString

public java.lang.String toString()
return the segment and its pitchmarks in mbrola format

Overrides:
toString in class java.lang.Object