get db values from .wav file python

251 views Asked by At

I am trying to get db values from .wav file python using this formula:
dbs = [20 * np.log10(np.sqrt(np.mean(chunk ** 2))) for chunk in chunks]
The issue I am facing is I am getting NaN values in dbs list because of negative values coming from np.mean(chunk**2).
How can I resole this issue?

0

There are 0 answers