be.hogent.tarsos.dsp
Class WaveformSimilarityBasedOverlapAdd

java.lang.Object
  extended by be.hogent.tarsos.dsp.WaveformSimilarityBasedOverlapAdd
All Implemented Interfaces:
AudioProcessor

public class WaveformSimilarityBasedOverlapAdd
extends java.lang.Object
implements AudioProcessor

An overlap-add technique based on waveform similarity (WSOLA) for high quality time-scale modification of speech

A concept of waveform similarity for tackling the problem of time-scale modification of speech is proposed. It is worked out in the context of short-time Fourier transform representations. The resulting WSOLA (waveform-similarity-based synchronized overlap-add) algorithm produces high-quality speech output, is algorithmically and computationally efficient and robust, and allows for online processing with arbitrary time-scaling factors that may be specified in a time-varying fashion and can be chosen over a wide continuous range of values.

Inspired by the work soundtouch by Olli Parviainen, http://www.surina.net/soundtouch, especially the TDStrech.cpp file.

Author:
Joren Six, Olli Parviainen

Nested Class Summary
static class WaveformSimilarityBasedOverlapAdd.Parameters
          An object to encapsulate some of the parameters for WSOLA, together with a couple of practical helper functions.
 
Constructor Summary
WaveformSimilarityBasedOverlapAdd(WaveformSimilarityBasedOverlapAdd.Parameters params)
          Create a new instance based on algorithm parameters for a certain audio format.
 
Method Summary
 int getInputBufferSize()
           
 int getOverlap()
           
 boolean process(AudioEvent audioEvent)
          Process the audio event.
 void processingFinished()
          Notify the AudioProcessor that no more data is available and processing has finished.
 void setDispatcher(AudioDispatcher newDispatcher)
           
 void setParameters(WaveformSimilarityBasedOverlapAdd.Parameters params)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WaveformSimilarityBasedOverlapAdd

public WaveformSimilarityBasedOverlapAdd(WaveformSimilarityBasedOverlapAdd.Parameters params)
Create a new instance based on algorithm parameters for a certain audio format.

Parameters:
params - The parameters for the algorithm.
Method Detail

setParameters

public void setParameters(WaveformSimilarityBasedOverlapAdd.Parameters params)

setDispatcher

public void setDispatcher(AudioDispatcher newDispatcher)

getInputBufferSize

public int getInputBufferSize()

getOverlap

public int getOverlap()

process

public boolean process(AudioEvent audioEvent)
Description copied from interface: AudioProcessor
Process the audio event. Do the actual signal processing on an (optionally) overlapping buffer.

Specified by:
process in interface AudioProcessor
Parameters:
audioEvent - The audio event that contains audio data.
Returns:
False if the chain needs to stop here, true otherwise. This can be used to implement e.g. a silence detector.

processingFinished

public void processingFinished()
Description copied from interface: AudioProcessor
Notify the AudioProcessor that no more data is available and processing has finished. Can be used to deallocate resources or cleanup.

Specified by:
processingFinished in interface AudioProcessor