public List<Data> collectOutput(BaseDataProcessor dataProc) throws DataProcessingException { dataProc.setPredecessor(this); List<Data> output = new ArrayList<Data>(); Data d; while ((d = dataProc.getData()) != null) { output.add(d); } return output; }
@Override public void initialize() { super.initialize(); // reset all stream tags streamEndReached = false; utteranceEndSent = false; utteranceStarted = false; if (bytesPerRead % 2 == 1) { bytesPerRead++; } }
@Override public void newProperties(PropertySheet ps) throws PropertyException { super.newProperties(ps); }
/** * Sets the predecessor for this DataProcessor. The predecessor is actually * the spectrum builder. * * @param predecessor the predecessor of this DataProcessor */ @Override public void setPredecessor(DataProcessor predecessor) { filterBank.setPredecessor(predecessor); }
protected Data getNextData() { Data data = frontEnd.getData(); return data; }
/** * Returns a description of this Cepstrum component in the format: * <cepstrum name> {<DataProcessor1>, <DataProcessor2> ... * <DataProcessorN>} * * @return a description of this Cepstrum */ @Override public String toString() { StringBuilder description = new StringBuilder(super.toString()) .append(" {"); for (DataProcessor dp : selectedDataProcessors) description.append(dp).append(", "); description.setLength(description.length() - 2); return description.append('}').toString(); }
/** * Sets the predecessor for this DataProcessor. The predecessor is actually * the spectrum builder. * * @param predecessor the predecessor of this DataProcessor */ @Override public void setPredecessor(DataProcessor predecessor) { filterBank.setPredecessor(predecessor); }
protected Data getNextData() { Data data = frontEnd.getData(); return data; }
/** * Returns a description of this FrontEnd in the format: <front end name> {<DataProcessor1>, <DataProcessor2> ... * <DataProcessorN>} * * @return a description of this FrontEnd */ @Override public String toString() { if (last == null) return super.toString() + " {}"; LinkedList<DataProcessor> list = new LinkedList<DataProcessor>(); for (DataProcessor current = last; current != null; current = current.getPredecessor()) list.addFirst(current); // add processors in their correct order StringBuilder description = new StringBuilder(super.toString()).append(" {"); for (DataProcessor dp : list) description.append(dp).append(", "); description.setLength(description.length() - 2); return description.append('}').toString(); }
/** Initializes this PLPFrequencyFilterBank object */ @Override public void initialize() { super.initialize(); }
@Override public void newProperties(PropertySheet ps) throws PropertyException { super.newProperties(ps); }
/** * Returns a description of this Cepstrum component in the format: * <cepstrum name> {<DataProcessor1>, <DataProcessor2> ... * <DataProcessorN>} * * @return a description of this Cepstrum */ @Override public String toString() { StringBuilder description = new StringBuilder(super.toString()) .append(" {"); for (DataProcessor dp : selectedDataProcessors) description.append(dp).append(", "); description.setLength(description.length() - 2); return description.append('}').toString(); }
/** Initializes this LiveCMN. */ @Override public void initialize() { super.initialize(); }
@Override public void newProperties(PropertySheet ps) throws PropertyException { super.newProperties(ps); }
/** * Returns a description of this FrontEnd in the format: <front end name> {<DataProcessor1>, <DataProcessor2> ... * <DataProcessorN>} * * @return a description of this FrontEnd */ @Override public String toString() { if (last == null) return super.toString() + " {}"; LinkedList<DataProcessor> list = new LinkedList<DataProcessor>(); for (DataProcessor current = last; current != null; current = current.getPredecessor()) list.addFirst(current); // add processors in their correct order StringBuilder description = new StringBuilder(super.toString()).append(" {"); for (DataProcessor dp : list) description.append(dp).append(", "); description.setLength(description.length() - 2); return description.append('}').toString(); }
@Override public void initialize() { super.initialize(); }
@Override public void newProperties(PropertySheet ps) throws PropertyException { super.newProperties(ps); gainFactor = ps.getDouble(GAIN_FACTOR); }
/** Constructs a DataDumper */ @Override public void initialize() { super.initialize(); }
@Override public void newProperties(PropertySheet ps) throws PropertyException { super.newProperties(ps); preemphasisFactor = ps.getDouble(PROP_PREEMPHASIS_FACTOR); }
/** Constructs a StreamCepstrumSource that reads MelCepstrum data from the given path. */ @Override public void initialize() { super.initialize(); curPoint = -1; firstSampleNumber = 0; // we don't want any more that endianness be set at the upper level, as BatchReco // utilizes an ad-hoc procedure to decide on endianness.. We want it to be fixed in the config file //bigEndian = true; }