MCPcopy Index your code
hub / github.com/tyiannak/pyAudioAnalysis / dc_normalize

Function dc_normalize

pyAudioAnalysis/ShortTermFeatures.py:14–19  ·  view source on GitHub ↗

Removes DC and normalizes to -1, 1 range

(sig_array)

Source from the content-addressed store, hash-verified

12
13
14def dc_normalize(sig_array):
15 """Removes DC and normalizes to -1, 1 range"""
16 sig_array_norm = sig_array.copy()
17 sig_array_norm -= sig_array_norm.mean()
18 sig_array_norm /= abs(sig_array_norm).max() + 1e-10
19 return sig_array_norm
20
21
22def zero_crossing_rate(frame):

Callers 4

chromagramFunction · 0.85
spectrogramFunction · 0.85
speed_featureFunction · 0.85
feature_extractionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected