'/sigma.mat') # standard deviation of a priori SNR in dB from MATLAB. sigma = tf.constant(sigma_mat['sigma'], dtype=tf.float32) ## DATASETS if args.train: ## TRAINING CLEAN SPEECH AND NOISE SET train_clean_speech_list = batch._train_list( args.train_clean_speech_path, '*.wav', 'clean') # clean speech training list. train_noise_list = batch._train_list(args.train_noise_path, '*.wav', 'noise') # noise training list. if not os.path.exists(args.model_path): os.makedirs(args.model_path) # make model path directory. if args.train or args.val: ## VALIDATION CLEAN SPEECH AND NOISE SET val_clean_speech, val_clean_speech_len, val_snr, _ = batch._batch( args.val_clean_speech_path, '*.wav', list(range(args.min_snr, args.max_snr + 1))) # clean validation waveforms and lengths. val_noise, val_noise_len, _, _ = batch._batch( args.val_noise_path, '*.wav', list(range(args.min_snr, args.max_snr + 1))) # noise validation waveforms and lengths. ## TEST NOISY SPEECH SET if args.test: test_noisy_speech, test_noisy_speech_len, test_snr, test_fnames = batch._batch( args.test_noisy_speech_path, '*.wav', []) # noisy speech test waveforms and lengths. ## GPU CONFIGURATION os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"] = args.gpu
'_noise_' + train_noise_ver + '_sample_size_' + str(sample_size) + '_mu_xi.mat') # mean of a priori SNR in dB from MATLAB. mu = tf.constant(mu_mat['mu_xi'], dtype=tf.float32) sigma_mat = spio.loadmat(stats_path + '/clean_speech_' + train_clean_speech_ver + '_noise_' + train_noise_ver + '_sample_size_' + str(sample_size) + '_sigma_xi.mat') # standard deviation of a priori SNR in dB from MATLAB. sigma = tf.constant(sigma_mat['sigma_xi'], dtype=tf.float32) ## DATASETS if train: ## TRAINING CLEAN SPEECH AND NOISE SET train_clean_speech_list = batch._train_list(train_clean_speech_path, '*.wav', 'clean') # clean speech training list. train_noise_list = batch._train_list(train_noise_path, '*.wav', 'noise') # noise training list. if not os.path.exists(model_path): os.makedirs(model_path) # make model path directory. if train or val: ## VALIDATION CLEAN SPEECH AND NOISE SET val_clean_speech, val_clean_speech_len, val_snr, _ = batch._batch(val_clean_speech_path, '*.wav', train_snr_list) # clean validation waveforms and lengths. val_noise, val_noise_len, _, _ = batch._batch(val_noise_path, '*.wav', train_snr_list) # noise validation waveforms and lengths. ## TEST NOISY SPEECH SET if test: test_noisy_speech, test_noisy_speech_len, test_snr, test_fnames = batch._batch(test_noisy_speech_path, '*.wav', []) # noisy speech test waveforms and lengths. ## GPU CONFIGURATION config = tf.ConfigProto() config.allow_soft_placement=True config.gpu_options.allow_growth=True config.log_device_placement=False ## PLACEHOLDERS s_ph = tf.placeholder(tf.int16, shape=[None, None], name='s_ph') # clean speech placeholder. d_ph = tf.placeholder(tf.int16, shape=[None, None], name='d_ph') # noise placeholder.