Skip to content

Conversation

@dhpollack
Copy link
Contributor

Using the stft function in the master branch, this create spectrograms in the power scale, converts those spectrograms to the MEL scale, and also converts the power scale to decibels. This is similar to the basic functionality of the librosa mel spectrograms that is already in the library.

Notably, I have not done any checks to see if the pytorch version supports stft. The current 0.3 branch does not support this function. Additionally, the dimension of the input and the output differ from the original MEL transform. This is because the stft function expects (c, n) rather than (n, c). Finally, the input variable names don't correspond to librosa, because librosa has a lot more options than these functions. This is all to say, one couldn't just change MEL to MEL2.

I split this into several transforms so one could create non-MEL or non-db spectrograms if one so desired.

@soumith soumith merged commit 92ea776 into pytorch:master Jan 18, 2018
@ezyang ezyang mentioned this pull request Mar 13, 2018
29 tasks
@dhpollack dhpollack deleted the torchspectrograms branch December 26, 2018 11:37
mthrok pushed a commit to mthrok/audio that referenced this pull request Feb 26, 2021
More clear and intuitive math explanation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants