Skip to content

Commit

Permalink
Merge pull request #311 from iver56/ij/docs
Browse files Browse the repository at this point in the history
Add note on audio quality in TimeStretch docs
  • Loading branch information
iver56 authored Jan 31, 2024
2 parents 9e71172 + 431fec8 commit b0e34db
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/waveform_transforms/time_stretch.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ _Added in v0.2.0_
Change the speed or duration of the signal without changing the pitch. This transform
employs `librosa.effects.time_stretch` under the hood to achieve the effect.

Under the hood this uses phase vocoding. Note that phase vocoding can degrade audio
quality by "smearing" transient sounds, altering the timbre of harmonic sounds, and
distorting pitch modulations. This may result in a loss of sharpness, clarity, or
naturalness in the transformed audio, especially when the rate is set to an extreme
value.

If you need a higher quality time stretch method, consider the following alternatives:

* [atempo in ffmpeg](https://ffmpeg.org//ffmpeg-all.html#atempo)
* [Rubber Band library](https://breakfastquay.com/rubberband/)
* [https://github.com/KAIST-MACLab/PyTSMod](https://github.com/KAIST-MACLab/PyTSMod)
* [https://github.com/vinusankars/ESOLA](https://github.com/vinusankars/ESOLA)

## Input-output example

In this example we speed up a sound by 25%. This corresponds to a rate of 1.25.
Expand Down

0 comments on commit b0e34db

Please sign in to comment.