Time-scale modification (TSM) is a digital audio effect that adjusts the length of an audio signal while preserving its pitch. The TSM audio effect is widely used in not only sound production but also music and audio research such as for data augmentation. In this paper, we present PyTSMod, an open-source Python library that implements several different classical TSM algorithms. We expect that PyTSMod can help MIR and audio researchers easily use the TSM algorithms in the Python-based environment.
Available TSM algorithms
- Overlap-Add (OLA)
- OLA is the most simple TSM algorithm that changes the length of the signal through modifying the hop size between analysis frame and synthesis frame.
- Pitch Synchronous Overlap-Add (TD-PSOLA)
- TD-PSOLA is the algorithm that analyzes the orignal waveforms to create pitich-synchronous analysis windows and synthesize the output signal both for modifying time-scale and pitch-scale.
- Waveform Similarity Overlap-Add (WSOLA)
- WSOLA maximizes the waveform similarity by allowing timing tolerance to analysis frame to find the most similar position through cross correlation.
- Phase Vocoder (PV)
- Phase vocoder estimates instantaneous frequency, and it is used to update phases of input signal’s frequency components in short-time Fourier transform. Although TSM results with phase vocoder has high phase continuity, it causes an transient smearing for percussive audio sources and a coloring artifact called phasiness.
- TSM based on harmonic-percussive source separation (HPTSM)
- A novel TSM algorithm that applying phase vocoder to only harmonic sources and applying OLA to only percussive sources.
PyTSMod is hosted on PyPI. To install, run the following command in your Python environment:
$ pip install pytsmod
|PV (with phase lock)|
|PV (with phase lock)|
For more audio examples, please visit the GitHub repo of PyTSMod.
 Jonathan Driedger, Meinard Müller. “TSM Toolbox: MATLAB Implementations of Time-Scale Modification Algorithms”, Proceedings of the 17th International Conference on Digital Audio Effects (DAFx-14). 2014.
 Jonathan Driedger, Meinard Müller. “A review of time-scale modification of music signals”, Applied Sciences, 6(2), 57. 2016.
 Udo Zölzer. “DAFX: digital audio effects”, John Wiley & Sons. 2011.