resampling audio with linear interpolation

조회 수: 13 (최근 30일)
alejandra
alejandra 2014년 9월 29일
답변: Star Strider 2014년 9월 29일
hi guys, i need your help, i made a program that reduce the sampling from 44100 to 8000 but i need that the audio has the same time with the resampling im aware that the audio its gonna sound different but thats the point the method that i have to use is linear interpolation i made this code that works with the resampling but the sound is weird :c someone help me please...
[s,fs]=wavread('anita.wav');
sound(s,fs);
s1=s;
[x,y]=size(s);
i=1;
j=1;
while i<=x
s2(j,1)=s1(i,1);
s2(j,2)=s1(i,2);
i=i+2;
j=j+1;
end
sound(s2)
wavwrite(s2,'s2.wav');

답변 (1개)

Star Strider
Star Strider 2014년 9월 29일
Remember to state the new sampling frequency in you second call to sound this time with ‘s2’. It may sound different because it is defaulting to 8192 Hz.

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by