|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.frontend.BaseDataProcessor
edu.cmu.sphinx.frontend.util.StreamDataSource
edu.cmu.sphinx.frontend.util.ConcatFileDataSource
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.
Optionally, silence can be added in-between the audio files by setting
the property:
edu.cmu.sphinx.frontend.util.ConcatFileDataSource.silenceFileto a audio file for silence. By default, no silence is added. Moreover, one can also specify how many files to skip for every file read.
You can also specify the name of a transcript file to write the transcription to. The transcription will be written in HUB-4 style. A sample HUB-4 transcript looks like:
bn99en_1 1 peter_jennings 0.806084 7.079850The format of each line is:Tonight this Thursday big pressure on the Clinton administration to do something about the latest killing in Yugoslavia bn99en_1 1 peter_jennings 7.079850 14.007608 Airline passengers and outrageous behavior at thirty thousand feet What can an airline do ... bn99en_1 1 inter_segment_gap 23.097000 28.647000 ...
test_set_name category speaker_name start_time_in_seconds end_time_in_secondsIn our example above,transcript
test_set_name is "bn99en_1" category is "1" speaker_name is "peter_jennings" start_time_in_seconds is "0.806084" end_time_in_seconds is "7.079850" category is "o" for "Overall" hub4_focus_conditions is: "f0" for "Baseline//Broadcast//Speech" "f1" for "Spontaneous//Broadcast//Speech" "f2" for "Speech Over//Telephone//Channels" "f3" for "Speech in the//Presence of//Background Music" "f4" for "Speech Under//Degraded//Acoustic Conditions" "f5" for "Speech from//Non-Native//Speakers" "fx" for "All other speech" speaker_sex is "male" transcript is "Tonight this Thursday big pressure on the Clinton administration to do something about the latest killing in YugoslaviaThe ConcatFileDataSource will produce such a transcript if the name of the file to write to is supplied in the constructor. This transcript file will be used in detected gap insertion errors, because it accurately describes the "correct" sequence of speech and silences in the concatenated version of the audio files.
Field Summary | |
static java.lang.String |
PROP_ADD_RANDOM_SILENCE
The SphinxProperty that specifies whether to add random silence. |
static boolean |
PROP_ADD_RANDOM_SILENCE_DEFAULT
The default value for PROP_ADD_RANDOM_SILENCE. |
static java.lang.String |
PROP_BATCH_FILE
SphinxProperty for the file containing a list of audio files to read from. |
static java.lang.String |
PROP_BATCH_FILE_DEFAULT
The default value of PROP_BATCH_FILE. |
static java.lang.String |
PROP_BITS_PER_SAMPLE
SphinxProperty for the number of bits per value. |
static int |
PROP_BITS_PER_SAMPLE_DEFAULT
Default value for PROP_BITS_PER_SAMPLE. |
static java.lang.String |
PROP_MAX_SILENCE
The SphinxProperty that specifies the maximum number of times the silence file is added between files. |
static int |
PROP_MAX_SILENCE_DEFAULT
The default value of PROP_MAX_SILENCE. |
static java.lang.String |
PROP_SAMPLE_RATE
SphinxProperty for the sample rate. |
static int |
PROP_SAMPLE_RATE_DEFAULT
Default value for PROP_SAMPLE_RATE. |
static java.lang.String |
PROP_SILENCE_FILE
The SphinxProperty that specifies the silence audio file, if any. |
static java.lang.String |
PROP_SILENCE_FILE_DEFAULT
The default value for PROP_SILENCE_FILE. |
static java.lang.String |
PROP_SKIP
The SphinxProperty that specifies the number of files to skip for every file read. |
static int |
PROP_SKIP_DEFAULT
The default value for PROP_SKIP. |
static java.lang.String |
PROP_START_FILE
The SphinxProperty that specifies which file to start at. |
static int |
PROP_START_FILE_DEFAULT
The default value for PROP_START_FILE_DEFAULT. |
static java.lang.String |
PROP_TOTAL_FILES
The SphinxProperty that specifies the total number of files to read. |
static int |
PROP_TOTAL_FILES_DEFAULT
The default value for PROP_TOTAL_FILES. |
static java.lang.String |
PROP_TRANSCRIPT_FILE
The SphinxProperty that specifies the name of the transcript file. |
static java.lang.String |
PROP_TRANSCRIPT_FILE_DEFAULT
The default value of PROP_TRANSCRIPT_FILE. |
Fields inherited from class edu.cmu.sphinx.frontend.util.StreamDataSource |
PROP_BIG_ENDIAN_DATA, PROP_BIG_ENDIAN_DATA_DEFAULT, PROP_BYTES_PER_READ, PROP_BYTES_PER_READ_DEFAULT, PROP_SIGNED_DATA, PROP_SIGNED_DATA_DEFAULT |
Constructor Summary | |
ConcatFileDataSource()
|
Method Summary | |
java.util.List |
getReferences()
Returns a list of all reference text. |
java.lang.String |
getTranscriptFile()
Returns the name of the transcript file. |
void |
initialize()
Initializes a ConcatFileDataSource. |
void |
newProperties(PropertySheet ps)
This method is called when this configurable component has new data. |
void |
register(java.lang.String name,
Registry registry)
Register my properties. |
Methods inherited from class edu.cmu.sphinx.frontend.util.StreamDataSource |
getData, setInputStream |
Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor |
getName, getPredecessor, getTimer, setPredecessor, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String PROP_SAMPLE_RATE
public static final int PROP_SAMPLE_RATE_DEFAULT
public static final java.lang.String PROP_START_FILE
public static final int PROP_START_FILE_DEFAULT
public static final java.lang.String PROP_SKIP
public static final int PROP_SKIP_DEFAULT
public static final java.lang.String PROP_TOTAL_FILES
public static final int PROP_TOTAL_FILES_DEFAULT
public static final java.lang.String PROP_SILENCE_FILE
public static final java.lang.String PROP_SILENCE_FILE_DEFAULT
public static final java.lang.String PROP_ADD_RANDOM_SILENCE
public static final boolean PROP_ADD_RANDOM_SILENCE_DEFAULT
public static final java.lang.String PROP_MAX_SILENCE
public static final int PROP_MAX_SILENCE_DEFAULT
public static final java.lang.String PROP_TRANSCRIPT_FILE
public static final java.lang.String PROP_TRANSCRIPT_FILE_DEFAULT
public static final java.lang.String PROP_BATCH_FILE
public static final java.lang.String PROP_BATCH_FILE_DEFAULT
public static final java.lang.String PROP_BITS_PER_SAMPLE
public static final int PROP_BITS_PER_SAMPLE_DEFAULT
Constructor Detail |
public ConcatFileDataSource()
Method Detail |
public void register(java.lang.String name, Registry registry) throws PropertyException
Configurable
register
in interface Configurable
register
in class StreamDataSource
PropertyException
public void newProperties(PropertySheet ps) throws PropertyException
Configurable
newProperties
in interface Configurable
newProperties
in class StreamDataSource
PropertyException
public void initialize()
initialize
in interface DataProcessor
initialize
in class StreamDataSource
public java.util.List getReferences()
getReferences
in interface ReferenceSource
public java.lang.String getTranscriptFile()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |