signal-processing

How to change pyplot.specgram x and y axis scaling?

耗尽温柔 提交于 2019-12-03 16:13:21
I have never worked with audio signals before and little do I know about signal processing. Nevertheless, I need to represent and audio signal using pyplot.specgram function from matplotlib library. Here is how I do it. import matplotlib.pyplot as plt import scipy.io.wavfile as wavfile rate, frames = wavfile.read("song.wav") plt.specgram(frames) The result I am getting is this nice spectrogram below: When I look at x-axis and y-axis which I suppose are frequency and time domains I can't get my head around the fact that frequency is scaled from 0 to 1.0 and time from 0 to 80k . What is the

Voice Echo Problem

纵然是瞬间 提交于 2019-12-03 15:45:41
I'm trying to build a video chat program using Adobe Flex but there is a giant problem with echos. If the participants arn't using headsets, everything they say echos. Worse, they can actually create positive feedback loop of echos that won't end until the mics are muted. Has anyone found a solution for this on the Flex/Flash platform? My software is using the Speex codec and I've done my best to eliminate all buffering (i.e. it's a live stream and I set the buffer length to 0). The loop back option is turned off and the "Use Echo Suppression" is turned on. I'm using the Red5 server for the

Where can I see the list of built-in wavelet functions that I can pass to scipy.signal.cwt?

放肆的年华 提交于 2019-12-03 15:26:07
This question was migrated from Signal Processing Stack Exchange because it can be answered on Stack Overflow. Migrated 5 years ago . Learn more . scipy.signal.cwt 's documentation says : scipy.signal.cwt(data, wavelet, widths) wavelet : function Wavelet function, which should take 2 arguments. The first argument is the number of points that the returned vector will have (len(wavelet(width,length)) == length). The second is a width parameter, defining the size of the wavelet (e.g. standard deviation of a gaussian). See ricker, which satisfies these requirements.wavelet : function Wavelet

Signal processing: FFT overlap processing resources

可紊 提交于 2019-12-03 15:19:42
问题 Are there any good (if possible scientific) resources available (web or books) about overlap processing. I am not that interested in the effects of using overlap processing and windows when analyzing a signal, since the requirements are different. It is more about the following Real Time situation: (I am currently dealing with audio signals) Dividing a signal into smaller parts. Creating overlap windows. FFTing the windowed chunks. Do processing in the frequency domain. IFFT the results. put

Determining the relative position of 2 mobile devices using ultrasound

二次信任 提交于 2019-12-03 15:03:47
问题 I am considering using ultrasound (inaudible) as an option for determining the relative position of 2 mobile devices (which can be either on Android or iOS devices). There will be my app installed on both of these devices. Its users will face each other (with their max. distance being 1,5 m), holding the devices facing each other. I would like to know whether it could be possible to create an efficient system in which one app would send ultrasound/inaudible signal and other user's app would

Finding periodicity in an algorithmic signal

℡╲_俬逩灬. 提交于 2019-12-03 14:30:40
In testing a conjecture about the following recursive relation , which claims a periodicity of some kind for the sequence of numbers, I wrote a python program which computes the sequences and prints them in a table. 1 # Consider the recursive relation x_{i+1} = p-1 - (p*i-1 mod x_i) 2 # with p prime and x_0 = 1. What is the shortest period of the 3 # sequence? 4 5 from __future__ import print_function 6 import numpy as np 7 from matplotlib import pyplot as plt 8 9 # The length of the sequences. 10 seq_length = 100 11 12 upperbound_primes = 30 13 14 # Computing a list of prime numbers up to n

Estimate transfer function from input output data

偶尔善良 提交于 2019-12-03 14:19:55
问题 I have a two-column matrix of data obtained from NI-DAQ. The first column is the output data of a motor-generator set (with driver) and the second column is the input data (square wave). I want to find the transfer function using tfest without Simulink. Is it possible? I have System Identification Toolbox . How can I attach a .mat file to this post? My data on gist https://gist.github.com/anonymous/6484844 回答1: You already got the right idea, I don't know where you got stucked. Here is the

Estimate formants using LPC in Python

孤者浪人 提交于 2019-12-03 13:52:13
I'm new to signal processing (and numpy, scipy, and matlab for that matter). I'm trying to estimate vowel formants with LPC in Python by adapting this matlab code: http://www.mathworks.com/help/signal/ug/formant-estimation-with-lpc-coefficients.html Here is my code so far: #!/usr/bin/env python import sys import numpy import wave import math from scipy.signal import lfilter, hamming from scikits.talkbox import lpc """ Estimate formants using LPC. """ def get_formants(file_path): # Read from file. spf = wave.open(file_path, 'r') # http://www.linguistics.ucla.edu/people/hayes/103/Charts/VChart

Build sample data for apache commons Fast Fourier Transform algorithm

我的未来我决定 提交于 2019-12-03 13:34:50
问题 I wanted to use Apache math commons implementation for FFT ( FastFourierTransformer class) to process some dummy data whose 8 data samples are contributing to one complete sinusoidal wave. The maximum being amplitude 230. The code snippet that I tried is below : private double[] transform() { double [] input = new double[8]; input[0] = 0.0; input[1] = 162.6345596729059; input[2] = 230.0; input[3] = 162.63455967290594; input[4] = 2.8166876380389125E-14; input[5] = -162.6345596729059; input[6]

Android Signal analysis + some filters

可紊 提交于 2019-12-03 13:27:38
问题 as the world cup is the main sport event and the Vuvuzelas are the most annoying sound in the world, I had an idea to remove them definitively by reading this new ( http://www.popsci.com/diy/article/2010-06/simple-software-can-filter-out-vuvuzela-whine) that told us that the sound has some frequencies at 233Hz + 466,932,1864Hz. I have already made a lot of Android application by myself but never touching the signal analysis and filtering part, so here are a few questions, I do not ask for