edu.cmu.sphinx.frontend.util
Class ConcatAudioFileDataSource
java.lang.Object
edu.cmu.sphinx.frontend.BaseDataProcessor
edu.cmu.sphinx.frontend.util.AudioFileDataSource
edu.cmu.sphinx.frontend.util.ConcatAudioFileDataSource
- All Implemented Interfaces:
- DataProcessor, Configurable, ReferenceSource
public class ConcatAudioFileDataSource
- extends AudioFileDataSource
- implements ReferenceSource
Concatenates a list of audio files as one continuous audio stream.
A DataStartSignal
will be placed before the start of the first file,
and a DataEndSignal
after the last file. No DataStartSignal or
DataEndSignal will be placed between them.
- Author:
- Holger Brandl
Method Summary |
java.util.List<java.lang.String> |
getReferences()
Returns a list of all reference text. |
void |
initialize()
Initializes a ConcatFileDataSource. |
void |
setAudioFile(java.net.URL audioFileURL,
java.lang.String streamName)
Sets the audio file from which the data-stream will be generated of. |
void |
setBatchFile(java.io.File batchFile)
|
void |
setBatchFiles(java.util.List<java.io.File> files)
|
void |
setBatchUrls(java.util.List<java.net.URL> urls)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ConcatAudioFileDataSource
public ConcatAudioFileDataSource()
ConcatAudioFileDataSource
public ConcatAudioFileDataSource(int bytesPerRead)
initialize
public void initialize()
- Initializes a ConcatFileDataSource.
- Specified by:
initialize
in interface DataProcessor
- Overrides:
initialize
in class AudioFileDataSource
setBatchFile
public void setBatchFile(java.io.File batchFile)
setBatchFiles
public void setBatchFiles(java.util.List<java.io.File> files)
setBatchUrls
public void setBatchUrls(java.util.List<java.net.URL> urls)
setAudioFile
public void setAudioFile(java.net.URL audioFileURL,
java.lang.String streamName)
- Description copied from class:
AudioFileDataSource
- Sets the audio file from which the data-stream will be generated of.
- Overrides:
setAudioFile
in class AudioFileDataSource
- Parameters:
audioFileURL
- The location of the audio file to usestreamName
- The name of the InputStream. if null
the complete path of the audio file will be
uses as stream name.
getReferences
public java.util.List<java.lang.String> getReferences()
- Returns a list of all reference text. Implements the getReferences() method of ReferenceSource.
- Specified by:
getReferences
in interface ReferenceSource
- Returns:
- a list of all reference text