-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcreate_masks.m
32 lines (28 loc) · 1.04 KB
/
create_masks.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
28
29
30
31
32
% Use this script to create masks for the CHiMe3 data. For each 7 channel
% utterance, it will create a clean audio wav file and compute the masks
% between the clean audio and each of 7 channel utterance.
% add the library
addpath('../mimlib');
addpath('../utils');
% working direction
% contain wav files for each channel for one
workDir = '/Users/Near/Desktop/MESSL/mvdr_test/dev/';
% Calculate delay between CH0 and the others
corrDir = strcat(workDir,'/corr/'); %temporary
corrDataDir = strcat(corrDir,'/data/');
% directory to save cleaned (MVDR) wav
outDir = strcat(workDir,'/out/'); %temporary
% directory to save the masks
outMaskDir = strcat(workDir,'/mask/');
mode = 'ideal_amplitude';
try
% compute and save masks based on cleaned audio
enhance_wrapper(@(X,fail,fs,file) stubI_Masks(X, file, outDir, mode), ...
workDir, strcat(outMaskDir,'/',mode,'/'), [1 1], 1, 0, 2, '.CH1');
catch
%remove temporary folders and files
error('Error during mask creation');
end
%remove temporary folders and files
%rmdir(corrDir,'s');
%rmdir(outDir,'s');