signal-processing

Computing the discrete fourier transform of audio data with FFTW

末鹿安然 提交于 2019-12-09 05:10:26
I am quite new to signal processing so forgive me if I rant on a bit. I have download and installed FFTW for windows. The documentation is ok but I still have queries. My overall aim is to capture raw audio data sampled at 44100 samps/sec from the sound card on the computer (this task is already implemented using libraries and my code), and then perform the DFT on blocks of this audio data. I am only interested in finding a range of frequency components in the audio and I will not be performing any inverse DFT. In this case, is a real to real transformation all that is necessary, hence the

How to detect sound frequency for particular sound in iphone?

…衆ロ難τιáo~ 提交于 2019-12-09 03:23:52
问题 I'm doing an app where I want to detect sound frequency. How to detect frequency for particular sound like dog sound? Does anybody have tutorial or some sample codes? 回答1: Detecting a single frequency, or even computing a single FFT, is not a reliable method for differentiating a dog bark from other common sounds of around the same volume. What might work is sound fingerprint analysis using MFCC's, followed by statistical pattern matching against a large enough "dog" sound database. Some

Use of scipy.signal.lombscargle

孤人 提交于 2019-12-09 02:32:30
For class, we are trying to prove a simple example of the Lomb-Scargle Periodogram using the embedded package in scipy. There is little documentation on how to use this function, and I have not been able to find any help online. When I run the code, I get a value of ~6.3 for the main peak of the periodogram, as opposed to the expected ~23.3. The data that we are pulling from is a simple .dat file with lists of numbers. Here is the code, any ideas on what's happening? import scipy as sp import math as m import numpy as np from scipy.signal import lombscargle import pylab as plt from numpy

unit of fft(DFT) x axis [duplicate]

﹥>﹥吖頭↗ 提交于 2019-12-09 00:03:19
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to get Frequency from FFT result I am somehow confused with the x axis of fft(DFT) command in Matlab. When we do a fft command for a signal which has sampled in n point, we get a plot in which the x axis is 0 to n-1. Does it mean frequency in Hz? For example when I have a spike on n=2 is it mean that the signal frequency is 2Hz? 回答1: The X axis is dimensionless. To get the correspondence between bin index

How to train a machine learning algorithm using MFCC coefficient vectors?

点点圈 提交于 2019-12-08 17:51:33
问题 For my final year project i am trying to identify dog/bark/bird sounds real time (by recording sound clips). I am using MFCC as the audio features. Initially i have extracted altogether 12 MFCC vectors from a sound clip using jAudio library. Now I'm trying to train a machine learning algorithm(at the moment i have not decided the algorithm but it is most probably SVM). The sound clip size is like around 3 seconds. I need to clarify some information about this process. They are, Do i have to

Recorded audio of one note produces multiple onset times

谁说胖子不能爱 提交于 2019-12-08 16:39:14
问题 I am using the Librosa library for pitch and onset detection. Specifically, I am using onset_detect and piptrack. This is my code: def detect_pitch(y, sr, onset_offset=5, fmin=75, fmax=1400): y = highpass_filter(y, sr) onset_frames = librosa.onset.onset_detect(y=y, sr=sr) pitches, magnitudes = librosa.piptrack(y=y, sr=sr, fmin=fmin, fmax=fmax) notes = [] for i in range(0, len(onset_frames)): onset = onset_frames[i] + onset_offset index = magnitudes[:, onset].argmax() pitch = pitches[index,

Get Frequency for Audio Input on iPhone

只愿长相守 提交于 2019-12-08 12:41:55
问题 How can I get the frequency for an audio input on iPhone? Is it necessary to use a FFT if I'm only interested in finding a specific frequency (i.e. within a timeframe of x milliseconds, check if there is a peak at y Hz)? 回答1: If you're just interested in a specific, fixed frequency (i.e. a pure tone) then you can use the Goertzel algorithm which is very simple to implement and relatively lightweight (computationally) compared to an FFT. 来源: https://stackoverflow.com/questions/11089870/get

How can I calculate the rolling mean, skewness, kurtosis, RMS and few other statistical features from an input vector?

随声附和 提交于 2019-12-08 12:20:50
问题 I have a signal collected every second for 3 hours at the rate of 40 Hz and the data length is 432,000. I want to calculate mean, skewness, kurtosis and few other statistical features for every minute. In the sense, I want to calculate the mean of first 40 data points and the second 40 data points and so on. In the end I wish to have a vector of length 180 points. It would be great if someone can share a script for doing this. Thanks in advance. 回答1: function [M, S, A, E] = slideStats( x,

units on x axis after FFT

倾然丶 夕夏残阳落幕 提交于 2019-12-08 11:28:28
My signal is a static 1D pattern detected by the linear photodiode array with N pixels and pitch p. What units will I get along the X-axis after FFT to spectrum? If you have a signal f(x) with unit U depending on variable x with unit V. Then the continuous Fourier transform of f has unit UV and depends on a variable with unit 1/V. Example 1: f(x) is a Voltage with x being time. then the Fourier transform has unit Vs (or V/Hz) versus variable 1/s (or Hz). Example 2: f(x) is a power with x being space. Then the FT has unit Wm and the x axis (which is then a wavenumber) unit 1/m (this is probably

what is practical meaning of impulse response?

守給你的承諾、 提交于 2019-12-08 11:28:03
问题 Impulse response is usually used in filter and for convolution but i always find it difficult to explain my self what is this and how does it help. My question what is practical meaning of impulse response, either it an equation or characteristic of a system in response to input. 回答1: Definition: In signal processing, the impulse response, or impulse response function, of a dynamic system is its output when presented with a brief input signal, called an impulse. Explanation: Think of it from