Skip to content

How to rescale dB range of spectrogram now that decibel_limits is deprecated #919

Answered by sammlapp
fascimare asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, welcome to the discussions page @fascimare and thanks for your question. I’ll copy my reply from the related issue #918

in opensoundscape v0.10.0 this adjustment knob moved from to_spec to to_tensor action (because the decibel limits are now applied not when creating the spectrogram but when converting it to a PyTorch tensor). It looks like the preprocessing tutorial notebook was not updated to reflect this change, apologies about that. We’ll make that change soon.

To adjust the decibel limits with opensoundscape>=0.10.0 use

preprocessor.pipeline.to_tensor.set(range=(-150,-50))

note that the param is called range.

I’m relying from my phone so apologies if there is a typo, but I believ…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fascimare
Comment options

Answer selected by fascimare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants