ezdtw
is a pure Python dynamic time warping library, intended for warping acoustic spectrograms.
This implementation uses two performance tricks:
- Distances are computed using Scipy's cdist function.
- The cumulative minimum distance calculation uses the numba jit compiler for a 500x speedup.
Computing the warp path between two typical zebra finch song motif spectrograms takes approximately 60ms of computation time.
- Python 3
- numpy
- scipy
- numba
You may want to use resin for creating spectrograms.
git clone https://github.com/kylerbrown/ezdtw.git
cd ezdtw
pip install .
from ezdtw import dtw
x, y = dtw(A, B)
See an example in the example/
folder.