Hot answers tagged

3

My guess is that the currently popular and new and likely robust way to solve this detection problem is to feed a sequence of audio fingerprints (such as MFCCs) to an RNN machine learning algorithm that was trained on a large wide range of rhythm tracks mixed with increasing levels of realistic background noise. Feeding audio stream samples directly to a ...


2

For sinusoids that are not exactly integer periodic in the FFT length, an FFT measures the phase at a circular discontinuity. And that discontinuity flips direction as frequency changes from slightly below to slightly above an exact integer periodic-in-aperture frequency. This is part of the effect of the default rectangular windowing of any finite length ...


2

They do mean the pseudo-frequency of the wavelet which is not dependent on the signal being analyzed. The misleading terminology that they use seems to come from from one of the references, Han, P. (2013), Investigation of ULF seismo-magnetic phenomena in Kanto, Japan during 2000–2010, PhD thesis, Chiba University, Chiba, Japan. Quoting an article of a ...


2

In practice, this does not matter much. All serious work normalizes audio levels. In our code base, there's even some code that runs a nightly check to verify our algorithms are gain-independent. We recognize that the external format is typically 16 bits, but this does not need to match the internal formats used in transforms. Internally, extra precision ...


2

The semantics for a sampled audio signal is very simple. Each sample represents an amplitude, each sample is done at a specific time. If you create a signal using a microphone, the amplitude is related to the pressure as measured by the microphone diaphragm. The sampling process will introduce time in the equation. In the question, there are two sets of ...


2

I don't know much about this semantics? of WAV files but their numerical format is the following. (assuming mono) Given a recording with 8-bit per sample precision, then those samples are unsigned integers taking values between $0$ and $255$. Due to being unsigned, to represent negative values, there is a bias of $128$, and the sample values are actually ...


1

Big thanks to @user753642 for spotting my mistakes over on the stackoverflow network: I was computing the $c_n$ coefficients from $n=0 \dots m$, where m is the number of wave functions in the sum. But by definitions the coefficients look like: $$c_m = \frac{1}{2L}\sum_{n = -\infty}^{\infty}c_n\delta_{n,m}\int_{-L}^Ldx = \frac{1}{2L}\int_{-L}^L f(x) \exp(\...


1

It will work when you take the 2nd gradient of the signals: import numpy as np from scipy import signal s0 = np.gradient(np.gradient(s0)) s1 = np.gradient(np.gradient(s1)) np.argmax(signal.correlate(s0, s1)) -> 525358 That corresponds to a shift of 1071 which is close to your expected 1069 Interestingly the minimum (most negative correlation) is close ...


1

You can use cv2.PSNR like this example: import cv2 img1 = cv2.imread('img1.bmp') img2 = cv2.imread('img2.bmp') psnr = cv2.PSNR(img1, img2)


1

turn to float first!!!!!!!! turn to float first!!!!!!!! turn to float first!!!!!!!! def compute_psnr(img1, img2): img1 = img1.astype(np.float64) / 255. img2 = img2.astype(np.float64) / 255. mse = np.mean((img1 - img2) ** 2) if mse == 0: return "Same Image" return 10 * math.log10(1. / mse)


Only top voted, non community-wiki answers of a minimum length are eligible