Reputation: 1
These days, I'm using librosa which is a kind of audio processing library. As a basic step to load audio files, one can use the function below.
librosa.core.load()
Upvotes: 0
Views: 825
Reputation: 52
There are no defined units for amplitude in Librosa's docs. However, you can convert amplitude into decibel units using the following command: librosa.amplitude_to_db(S, ref=1.0, amin=1e-05, top_db=80.0)
Documentation for Librosa's magnitude functions can be found here: https://librosa.org/doc/main/core.html#magnitude-scaling
Upvotes: -1
Reputation: 6259
librosa.load
returns a numpy array of type float32
, with values between -1.0
and 1.0
. What physical quantity these values correspond to in the real world (or if they do at all) is unknown. So on its own, it is unitless.
If they file was recorded with a microphone, the values are linear with changes in air pressure. If you know the air pressure at time of recording (mean and min/max), you could map the values back to pressure (unit: Pascal).
Upvotes: 2