Removes DC and normalizes to -1, 1 range
(sig_array)
| 12 | |
| 13 | |
| 14 | def 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 | |
| 22 | def zero_crossing_rate(frame): |
no outgoing calls
no test coverage detected