@Test
public void testMultipleEmptyAndNonemptySegments() throws DataProcessingException {
int sampleRate = 1000;
// process an empty segment
input.add(new DataStartSignal(sampleRate));
input.add(new DataEndSignal(sampleRate));
// process a segment which contains a speech segment which is empty
input.add(new DataStartSignal(sampleRate));
input.add(new SpeechStartSignal(-1));
input.add(new SpeechEndSignal(-1));
input.add(new DataEndSignal(sampleRate));
// process a segment which contains a speech segment which is empty but has some non-speech data around it
input.add(new DataStartSignal(sampleRate));
input.addAll(createFeatVectors(1, sampleRate, 0, 10, 10)); // create one second of data sampled with 1kHz
input.add(new SpeechStartSignal(-1));
input.add(new SpeechEndSignal(-1));
input.addAll(createFeatVectors(1, sampleRate, 0, 10, 10)); // create one second of data sampled with 1kHz
input.add(new DataEndSignal(sampleRate));
// and now a some real segments
input.add(new DataStartSignal(sampleRate));
input.add(new SpeechStartSignal(-1));
input.addAll(createFeatVectors(0.1, sampleRate, 0, 10, 10));
input.add(new SpeechEndSignal(-1));
input.add(new DataEndSignal(sampleRate));