audioop.findfactor(fragment, reference)
Return a factor F such that rms(add(fragment, mul(reference, -F)))
is minimal, i.e., return the factor with which you should multiply reference to make it match as well as possible to fragment. The fragments should both contain 2-byte samples.
The time taken by this routine is proportional to len(fragment)
.
Please login to continue.