Reputation: 3
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?
Upvotes: 0
Views: 293