# Tag Info

0

Whether you want to normalize or not depends on whether you want to know the level or the energy of the DFT input. IIRC, the SciPy FFT returns energy (complies with Parseval’s relation). A signal N times as long at the same level has N times more energy. So you could divide by N to get an estimation of a level instead of energy.

1

Your decision to normalize or not does not change the accuracy of your answer, as it is simply a scaling factor. If you use the common scaling of $1/N$, then the output for each DFT bin will represent the average of the portion of the input signal that is at the frequency defined by that bin, scaled to the same units as the input. So that is convenient and ...

0

I'm an audio guy and not a biomed guy, but if the ECG is decently periodic except for an occasional artifact or anomaly like a PVC, you can do "pitch detection" (estimating the period or fundamental frequency) of the waveform and tune a comb filter to null out the periodic component. Then the anomalies will be the only thing left after subtracting or ...

1

Simple clipping : threshold = 0.5 If x > threshold x = threshold elseif x < -threshold x = -threshold end Real-world clipping can be significantly more complex than this, involving various time-constants, asymmetry, heating-effects,....

2

Python librosa library has a functionality you can use: librosa.effects.split(y=buffer, frame_length=8000, top_db=40) Split an audio signal into non-silent intervals. Given sampling rate of 8000 it will split the audio by detecting audio lower than 40db for period of 1 sec Or, you can trim the audio "silent parts" using: librosa.effects.trim(y=buffer,...

1

Yes I would suggest to use resample_poly in scipy. When doing upsampling, you would get artefacts outside 12.8kHz, which you would remove via Low Pass Filtering. This is what is done by scipy.signal.resample_poly. You can enter the upsampling factor value as 36k/25.8k = 1.39534, and downsampling factor = 1. In the above method while doing low pass filtering,...

0

I suggest monitoring the phase versus time directly instead of frequency. Frequency is the derivative of phase so the slope of the phase would indicate the frequency. Detrend the phase slope for the starting frequency and then the point in time where the phase starts to ramp up should be easier to detect. The window in which to detect this change will be ...

0

Is it possible to get the frequency of sine wave(100Hz) and sampling rate (1kHz) from the PCM data that I received. You will need to know either the frequency of the sine wave or the sampling rate. A digital signal is just a sequence of numbers. A 100 Hz sine wave sampled at 1 kHz looks identical to a 113 Hz wave sampled at 1.13 kHz. It's a sine with 10 ...

1

Here is it ... install pyaudo to play the generated sine signal, install numpy to help you with arrays and math, install matplotlib to plot ... I wrote this code quickly just to show how to do... some steps are commented in the code, this will play one generated signal in the choose frequency, concatenate all vectors signals and play using pyaudio at the ...

1

That doesn't seem worth the bother. FFT of a 7 second long wave file on my windows 10 laptop using Matlab takes about 5 milliseconds. So unless you have a particularly slow setup, you will not save a significant amount of time by storing the FFTs instead of just reading the raw wave file and doing the processing again each time. That doesn't seem to ...

Top 50 recent answers are included