This MR contains a few changes that improve the behavior of libtsm when an invalid sequence of anchor points is given to either pv_tsm or wsola_tsm. Both functions now raise an assertion error when
the first anchor point is not at sample 0 for the target sequence, or
any anchor point contains a negative value, or
the anchor point sequence is not monotonously increasing for both source and target sequence.
Furthermore, a new helper function libtsm.ensure_validity can help ensuring monotonicity with a simple heuristic that removes any anchor points that lead to an analysis hop size of 0.
Finally, a bugfix is included to use smoother anchor points for the pitch shifting.
This MR contains a few changes that improve the behavior of libtsm when an invalid sequence of anchor points is given to either
pv_tsm
orwsola_tsm
. Both functions now raise an assertion error whenFurthermore, a new helper function
libtsm.ensure_validity
can help ensuring monotonicity with a simple heuristic that removes any anchor points that lead to an analysis hop size of 0.Finally, a bugfix is included to use smoother anchor points for the pitch shifting.