-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.m
31 lines (24 loc) · 882 Bytes
/
main.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
clear all
%% read wavs
[mix,fs] = audioread("data/1observation.wav");
[source,fs] = audioread('data/1source.wav');
%% stft
windowSize=32;
shiftCof=0.5;
fsResample = 16000;
fftSize = fsResample*windowSize/1000; % Number of points for FFT
shiftSize = shiftCof*fftSize; % Number of points for window shift
%% set parameters
beta = 1; % shape parameter
p = 0.5; % domain parameter
refMic = 1; % reference channel
it = 40; % iterations for updates
itNMF = 1; % iterations for NMF parameters in each update
nb = 40; % the number of basis vectors in NMF
L = 17; % prediction order
delta = 1; % prediction delay
%% perform dereverberation
seed=1;
RandStream.setGlobalStream(RandStream('mt19937ar','Seed',seed));
[drb] = GNMFCGGWPE(mix(:,1:4), nb, L, delta, fftSize, shiftSize, it,itNMF, beta,p,refMic);
audiowrite('data/dereverberatedSignal.wav',drb,fsResample);