I have an audio dataset featured with MFCCs and it is a 1D array numpy file. There are 45K of examples in total, so it is a numpy file with 1 column and 45K row. In each row, there is a nested object with N rows and 13 columns. Since the length of each example is different, I am trying to resize them to the same length, so that they all have the same numbers of column and row for further ML training. Here is an example of how to data looks like:
the first example in the dataset, with 13 columns and 43 rows
the second example in the dataset, with 13 columns and 33 rows
I tried to use dynamic time warping but it looks like all the code provided online only show me how to calculate the shortest distance among two audio examples:
import numpy as np
from scipy.spatial.distance import euclidean
from fastdtw import fastdtw
x = np.array([[1,1], [2,2], [3,3], [4,4], [5,5]])
y = np.array([[2,2], [3,3], [4,4]])
distance, path = fastdtw(x, y, dist=euclidean)
print(distance)
But I don't really need to know the distance between two examples, instead, I need to know how to actually resize them, so that it can be put into a symmetric matrix, so I don't even know if the direction I am looking at is right. I have also tried to look into the python tslearn library but had no luck in finding anything useful. thank you!