Skip to content

Instantly share code, notes, and snippets.

@finiteautomata
Created June 16, 2017 20:23
Show Gist options
  • Save finiteautomata/3f220ff4f4440b40cfb153235b065aa7 to your computer and use it in GitHub Desktop.
Save finiteautomata/3f220ff4f4440b40cfb153235b065aa7 to your computer and use it in GitHub Desktop.
clc
pkg load signal
fs = 16000
[audio, fs] = wavread("files/Audio.wav");
%%
%%
%%
%% N es la cantidad de muestras en 100ms
win = fix(100 * fs / 1000);
stp = fix(50 * fs / 1000);
fftn = 2^11;
[S, f, t] = specgram(audio, fftn, fs, win, win-stp);
S_ext=[S;conj(S(end-1:-1:2, :))];
ifft_S=real(ifft(S_ext));
ifft_normalizada=ifft_S(1:win, :)./hanning(win);
nuevo_audio=ifft_normalizada(1:stp,:)(:);
wavwrite(nuevo_audio,fs, "frankestein2.wav");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment