Class 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
Nested Classes Modifier and Type Class Description static class
WaveformSimilarityBasedOverlapAdd.Parameters
An object to encapsulate some of the parameters for WSOLA, together with a couple of practical helper functions. -
Constructor Summary
Constructors Constructor Description WaveformSimilarityBasedOverlapAdd(WaveformSimilarityBasedOverlapAdd.Parameters params)
Create a new instance based on algorithm parameters for a certain audio format. -
Method Summary
Modifier and Type Method Description 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)
-
Constructor Details
-
WaveformSimilarityBasedOverlapAdd
Create a new instance based on algorithm parameters for a certain audio format.- Parameters:
params
- The parameters for the algorithm.
-
-
Method Details
-
setParameters
-
setDispatcher
-
getInputBufferSize
public int getInputBufferSize() -
getOverlap
public int getOverlap() -
process
Description copied from interface:AudioProcessor
Process the audio event. Do the actual signal processing on an (optionally) overlapping buffer.- Specified by:
process
in interfaceAudioProcessor
- 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 interfaceAudioProcessor
-