matlab生成数据集lst


  • 这样做的目的是省磁盘空间
% gen lst for big scale data #
clear; clc
noise_len = 10000000;
max_speech_len = 7 * 16000;
num_T60 = 10;
num_angle = 37;
num_speech = 7833;
num_snr = 5;
num_loc = 2;
num_train = 300000; %训练集数量


snr_idx = randi(num_snr, num_train, 1);
speech_idx = randi(num_snr, num_train, 1);
T60_idx = randi(num_T60, num_train, 1);
noise_idx = randi(noise_len - max_speech_len + 1, num_train, 1);
angle_idx = zeros(num_train, 2); for i = 1:num_train angle_idx(i, :) = randperm(num_angle, num_loc); end
save 'train.mat'; %保存lst