Questions tagged [python]

Python is a high-level interpreted general programming language. Python has popular numerical and scientific libraries/packages, most notably numpy and scipy. The scipy.signal package is a powerful signal processing software collection. This tag covers the use of numpy, scipy, and other Python packages often used for SP computations.

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

Is this a valid way to standardize and padding spectrograms using librosa?

This is my first time working with an audio data and I am working with a private dataset with the input of audio clips with each clips have a duration of 3 seconds. After looking through the web I ...
0
votes
0answers
20 views

Circular queue to use signal processing

How can I forward real time audio samples to different client for further analysis using circular queue in python.
0
votes
1answer
20 views

How to implement Matlab welch in python with the same result?

I want to implement Matlab pwelch function in python. The Matlab code is shown blew: [PSD,f] = pwelch(data,length(data),[],[],2000); which data is a row vector ...
1
vote
0answers
51 views

How to filter out noise in high frequency signal?

I am trying to filter this signal (download-zip): ...
0
votes
1answer
15 views

Generating spectrogram for band-pass filtered wav file python

I have some .wav files of heart sounds. I want to apply band-pass filter [20Hx 100 Hz]. Then generating PCG images size of 560x420 pixels and RGB format. How could i do this? Any help will be highly ...
0
votes
0answers
8 views

SSD object detection - Class score and bbox coordinates computing

How does SSD ( single shot multibox )object detection model computes the the confidence score and the bounding box coordinates, referring to SSD paper, it said that this process is done with the aid ...
0
votes
0answers
18 views

Least Square Support Vector Machine (LS-SVM) in python

I was wondering if there is a package for LS-SVM in python? I know how to carry out SVM but not sure how to call LS-SVM and also if there would be some sample codes for LSSVM?
0
votes
1answer
42 views

PyAudio recording is taking much longer than planned

I'm trying to record sounds in chunks using PyAudio for 15 seconds, chunk size being 1024 and sampling rate is 1024 *40. I understand the number of chunks would be (time of recording) * (sampling rate)...
0
votes
1answer
19 views

How do I filter out this horizon from my contour?

I am trying to identify the T-rex and obstacles (cactus and bird) from Google's no-internet game. What I have done is: Apply GaussianBlur filter Apply Canny Apply Dilate Apply erode findContours ...
0
votes
1answer
37 views

Conclusions of sampling around Nyquist Rate

I'm trying to understand some results of playing around with sampling around a signal's Nyquist sampling rate. For my example, I'm sampling a $B=5\mathrm{Hz}$ wave over a 1 second period. In the ...
-1
votes
2answers
57 views

how to remove noise from heart sounds?

i have .wav files acquired through putting android cell phone MIC directly on chest of person.For feature extraction, i have to made them noise free. These recordings were taken in rooms with no noise ...
0
votes
0answers
24 views

Finding frequencies(and bandwidth) that works best audio in a certain medium

Complete DSP and coding newbie(learning python). I am trying to find frequencies that can pass through well in a musical instrument tube. I am trying to find audio frequencies(audible and inaudible ...
0
votes
1answer
50 views

How to prevent distortion after down-sampling?

I am new to audio signal processing, but in one of my machine learning projects that I am working on, I need to down-sample my audio somewhere in the middle of my neural network. Therefore, I need a ...
0
votes
0answers
12 views

How to create synthetic blurred image from sharp image using PSF kernel (in image format)

I tried to create synthetic blurred image from ground-truth image using PSF kernels (in png format), some paper only mentioned that I need to do convolve operation on it, but it's seem to be I need ...
0
votes
1answer
44 views

Signal processing using numpy python

To process a .wav audio file with numpy (using fast Fourier transform algorithm). I want to process an audio signal at a particular interval with a sampling frequency 44100hz and sampling rate of 20ms ...
0
votes
1answer
36 views

Prefactors computing PSD of a signal with numpy.fft VS. scipy.signal.welch

The power spectral density St of a signal u may be computed as the product of the FFT of the signal, ...
0
votes
0answers
25 views

How to reduce noise in plot of velocity calculated from GPS points?

I'm interested to see if it's possible to compute the velocity given only GPS data and so, I calculated the distance between GPS points and computed the velocity by dividing it by the time interval ...
0
votes
1answer
27 views

How can I reduce background noise from recorded audio conversation and separate speakers in python?

I have a recording of an audio conversation of two persons. I want to remove the background noise from audio and then also separate both persons' audio separately in python. I have gone through some ...
0
votes
1answer
62 views

Kalman Filter - How to combine data from sensors with different measurement rates?

I'm trying to implement a Kalman filter for tracking the position of a vehicle with the help of position data from GPS and Odometry measurements. The GPS data (WGS84 format collected from an app on an ...
1
vote
2answers
76 views

How to do FFT fractional time delay (SOLVED)

I am trying to time-shift a signal using the FFT, however I have encountered some strange effects that depend on the size of the time-shift. I need to be able to shift the time by an arbitrary amount -...
0
votes
0answers
35 views

Clip wav by PSD

I have the following two things. sequence_1: Sound file in the wave format. PSD_1: Some PSD (Power Spectral Density). I want that the PSD(sequence_1) < PSD_1 for all indices. How I think about ...
0
votes
1answer
38 views

Faster Algorithm to convolve/correlate two sparse 1-D signals in python (or any language)

I have two signals which I need to correlate or convolve. Each signal is sampled non-uniformly and the values of the signal I have with me are the timestamp and the magnitude of the signal at that ...
0
votes
0answers
109 views

Python tool for time-frequency analysis

I am trying to perform time-frequency analyses using the PyWavelets (pywt) toolkit for python. My ultimate goal is to perform time-frequency analyses for EEG signals but I am starting with something ...
0
votes
0answers
16 views

Removing silent frames from audio files using MFCC+Z-Score

So I'm using ESC-50 audio database, and the files have some silent frames. While trying to reduce the weight of these silent portions for machine learning later, I noticed something. The silent frames ...
0
votes
0answers
13 views

What features can be extracted from accelerometer sensor used for Structural Health Monitoring (SHM)?

I am using dataset found online for SHM which uses accelerometer sensor to detect changes in the structure. I know that I can transform the time-domain data into a frequency-domain and into a time-...
1
vote
1answer
57 views

Error in using Kalman Filter for 2D Position Estimation in Python

This is my first question on DSP Stack exchange, so I apologise if it is poorly worded. I have some positioning data from a vehicle (GPX Format, collected through Strava) and want to use a Kalman ...
0
votes
0answers
8 views

Obtain points in signals which cause correlation

I've got two large .wav files (tens or hundreds of minutes each). I know that at some points these files contain very similar areas - actually, these areas are the ...
0
votes
1answer
59 views

how to extract a radio signal features with python?

I have a dataset of radio signals that i want to classify. So, I decided to extract features. After some googling, I have noticed that I have to calculate moments, cumulants, Kutosis and skewness to ...
0
votes
0answers
39 views

splitting real voice based on words using python or other program

Recently, I have a research project that need me to cut a large number of wav files containing the voice from movies, youtube videos or songs based on words for statistical analysis. The sounds are ...
0
votes
0answers
42 views

How do I find the peak frequency of a wav file in python?

I am fairly new to python and signal processing and I was given a task to record audio for 'x' seconds and then find the peak frequency in the audio file. So far I have successfully implemented the ...
1
vote
1answer
54 views

Any experiences for plotting a stationary wavelet transform?

I am experimenting with wavelets for my thesis and am currently working with the stationary WT pywavelets provides. There are very nice plots for CWTs, but does anyone know a technique for producing ...
0
votes
0answers
19 views

Image processing and object detection in sales force automation

We have a specific requirement in our sales force automation product. Requirement in merchandising module There is one shelf check activity in merchandising where salesman is capturing which ...
-1
votes
1answer
37 views

Explanation for the following code in python [closed]

x=2 *(rand(N) >= 0.5) - 1 Can someone please explain how the above expression corresponds to BPSK signal please?
0
votes
0answers
8 views

Logical Steps to segmenting Lung Fissure Structures

I am given the task to do the Lung Major Fissure Segmentation in a CT image to find it's position in an image. This is what a Major Fissue looks like: https://www.med-ed.virginia.edu/courses/rad/cxr/...
0
votes
1answer
47 views

Attenuate the low frequencies in a speech wave

I am designing an FIR filter to attenuate the frequencies below 300Hz. I designed the filter using the ...
0
votes
3answers
61 views

Analyzing a signal that contains frequency content at Fs/2 doesn't seem to work unless there is a phase shift

I am trying to write a basic program that samples a 4 kHz sinewave at a sampling rate of 8 kHz and takes the FFT of the signal and plots it. From everything I have read, as long as the signal you are ...
0
votes
1answer
74 views

Low-Pass Filtering of not evenly sampled signal

I have a signal sampled unevenly over 1 million ns. the signal is sampled over 1GHZ clock and the samples are as the following: 0-100 ns - sample every 1 ns. 100-1000 ns - sample every 10 ns. 1000-...
1
vote
1answer
105 views

Removing breaths using python

My wife is trying her hand at making audio books and spends a lot of time cleaning up some voice actors breaths in their "finished" audio. We have tried some filters in Adobe Audition and it helps but ...
0
votes
2answers
114 views

Python Hilbert does not seem to calculate the envelope

I am following the example from: https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.hilbert.html And although I can replicate their example, it does not work with my data. This is the ...
0
votes
0answers
28 views

Python mixing, filtering, and decimation. I'm a rookie!

Background: I have a spectrogram of window length 256 time frames and window width 1024 frequency bins. It initially took IQ using 10*log_10(magnitude) to output this spectrogram with window overlap ...
0
votes
0answers
43 views

Finding recorded sub-signal in the original audio signal

I have the original record of a song, and some fragment of the same song recorded by a microphone. I need to find the time where the fragment is appearing in the original. I have tried to use cross-...
0
votes
0answers
18 views

Should PSD be smoothed for SNR computation in frequency domain?

When taking the Power Spectral Density of a short duration signal (say 1 second, sampled at 4096 Hz), should it be smoothed to compute SNR? I want to computed the matched filter SNR, perfectly knowing ...
0
votes
1answer
65 views

How to design a digital filter in python that will run over an uC?

I am trying to implement a digital filter over a uC (it doesn't really matter which filter and which micro controller because I'm looking forward to learn how to do it in the future with different ...
1
vote
2answers
62 views

Building periodic sequences from finite-support sequences

Given a discrete-time finite-support signal x[n] $$x[n] = \left\{ {\begin{array}{*{20}{l}} {{{( - 1)}^n}n}&{{\rm{ }}n = 1,2,3}\\ 0&{{\rm{otherwise}}} \end{array}} \right.$$ And consider also ...
0
votes
1answer
69 views

High resolution spectrograms

I have a recorded audio signal that I would like to convert into spectrogram with the highest possible yield of information. The audio clips I am working with is about 30 ms long and contains ...
1
vote
0answers
68 views

SNR computation in frequency domain with scipy.fftpack.fft

I have a noisy time series (gaussian coloured noise) to which I add a signal. I call the sum of noise+signal a segment. In the picture you can see an instance: I want to compute the signal-to-noise ...
0
votes
0answers
14 views

Signal Header:Physical Min is not less than Physical Max- after opening EDF file on the viewer

Whenever I open an EDF file on the Case Western Research University's EDF Viewer Application, I get a Scaling Warning-"Signal Header:Physical Min is not less than the Physical Max ". I am reading ...
1
vote
1answer
44 views

I want to actuate a motor based on a wav file, but it has too many samples per second [closed]

I am trying to actuate a simple DC motor based on a wav file. At the moment I am using the "cat vs dogs sounds" from Kaggle. One of the wav files in this DB looks like this: These audio files are ...
0
votes
0answers
27 views

Detect Colors in an image using opencv python

How to find different colors present in an image? Is K means clustering enough or any other simple way of doing it using opencv exist?
0
votes
1answer
48 views

How do I detect the sharp edges in the following image?

I am looking to count the sharp pointy triangular things in the image. However I was unable to do so. One approach I did try was take a convex hull of the contour and then find convex defects but it ...