Package com.sun.speech.freetts.relp
Class SampleSet
java.lang.Object
com.sun.speech.freetts.relp.SampleSet
Represents the frame and residual data
used by the diphone database
used Residual Excited Linear Predictive synthesizer
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a SampleSet by reading it from the given input streamSampleSet
(ByteBuffer bb) Creates a SampleSet by reading it from the given byte bufferSampleSet
(StringTokenizer tok, BufferedReader reader) Reads a SampleSet from the input reader. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Dumps this sample set to the given streamint
getFrameSize
(int frame) Gets the size of the given framegetSample
(int index) return the sample associated with the indexRetrieves the info on this SampleSetint
getUnitSize
(int start, int end) Returns the size of the unit represented by the given start and end points
-
Constructor Details
-
SampleSet
Reads a SampleSet from the input reader.- Parameters:
tok
- tokenizer that holds parameters for this SampleSetreader
- the input reader to read the data from
-
SampleSet
Creates a SampleSet by reading it from the given byte buffer- Parameters:
bb
- source of the Unit data- Throws:
IOException
- if an IO error occurs
-
SampleSet
Creates a SampleSet by reading it from the given input stream- Parameters:
is
- source of the Unit data- Throws:
IOException
- if an IO error occurs
-
-
Method Details
-
dumpBinary
Dumps this sample set to the given stream- Parameters:
os
- the output stream- Throws:
IOException
- if an error occurs.
-
getSample
return the sample associated with the index- Parameters:
index
- the index of the sample- Returns:
- the sample.
-
getSampleInfo
Retrieves the info on this SampleSet- Returns:
- the sample info
-
getUnitSize
public int getUnitSize(int start, int end) Returns the size of the unit represented by the given start and end points- Parameters:
start
- the start of the unitend
- the end of the unit- Returns:
- the size of the unit
-
getFrameSize
public int getFrameSize(int frame) Gets the size of the given frame- Parameters:
frame
- the frame of interest- Returns:
- the size of the frame
-