Calculation of frame length as time unit in melspectrogram

104 views
Skip to first unread message

mkj...@gmail.com

unread,
Jul 25, 2018, 9:52:33 PM7/25/18
to librosa
When I use the function below, I wonder how to calculate the length of one frame as time unit.

librosa.feature.melspectrogram(y=Nonesr=22050S=Nonen_fft=2048hop_length=512power=2.0**kwargs)


Under default settings, is it correct to calculate frame length in the following way?

frames length = n_fft / sr =  2048 / 22050 = 0.0929 s = 93 ms


Then, if I want to change frames length to 23 ms, is it correct to set n_fft to 508?  (508 / 22050 = 0.0230 s = 23 ms)
Reply all
Reply to author
Forward
0 new messages