Python equivalent of Matlab's resample()

Question:

Is there a python function that achieves resampling in the way MATLAB’s resample() does? I’ve looked into scikits.samplerate’s resample function but I’m not quite getting similar results.

Asked By: Anand PA

||

Answers:

There’s a blog ‘Audio Resampling in Python‘ about this. Both resampy and scipy.signal have a resample function implementation in different ways.

Answered By: Mike Tang

The best function that is equivalent to MATLAB resample is as such:

MATLAB:

resample(  Data_Low_Freq_v, Upsample_n ,Downsample_n );

Python:

import scipy.signal as ssg    
ssg.resample_poly(Data_Low_Freq_v, Upsample_n, Downsample_n)
Answered By: Ohads
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.