Skip to content

Commit

Permalink
The BWE stimuli had noisy artifacts. Now the BWE signals are windowed…
Browse files Browse the repository at this point in the history
… to exclude the noisy part at the end. There was also an issue with the reproducibility of the BWE, which was due to some random components in the algorithm. This was changed by explicitly seeding the random number generator. The seed was carefully selected to avoid any further artifacts. Under certain (as of yet unknown) circumstances, the BEW algorithm otherwise produces audible artifacts within the male /u/. The selected see minimizes this artifact so that it can be assumed to be no longer audible. (#3)

Co-authored-by: Simon Stone <[email protected]>
  • Loading branch information
Simon-Stone and Simon Stone authored Oct 21, 2021
1 parent b105eed commit 0da559c
Show file tree
Hide file tree
Showing 65 changed files with 21 additions and 9 deletions.
11 changes: 7 additions & 4 deletions include/cleanupBweSignal.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@
% parts around the speech signal. This function gets rid of those by
% fading the actual speech signal in and out.
%
% y: Bandwith-extended speech signal consisting of [silence, speech,
% y: Bandwidth-extended speech signal consisting of [silence, speech,
% silence]
% sil: Duration of the symmetric (!) silence before and after the
% speech

% Number of non-silent samples (with a little bit of slack)
nSpeech = length(y) - floor(1.8*sil);
% Number of non-silent samples
nSpeech = length(y) - floor(2.2*sil);

% Fading part of the window
win = tukeywin(nSpeech, 0.05);
win = tukeywin(nSpeech, 0.1);

% Extend by zeros
win = padarray(win, floor((length(y) - length(win)) / 2), 'pre');
win = padarray(win, length(y) - length(win), 'post');

% Move window back a little bit to get rid of noise tail
win = circshift(win, floor(-0.1*sil));

y = y .* win;
end

2 changes: 1 addition & 1 deletion include/extend_to_8kHz.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
global path_to_GMM;
path_to_GMM = '../include/bandwidth_extension/ABE_explicit_memory_ICASSP18/2_GMM_training/existing_models/';

past_frames = 2; future_frames=2; inp_feature= 'LogMFE_zs_pca'; dimX=10; dimY=10;
past_frames = 1; future_frames=1; inp_feature= 'LogMFE_zs_pca'; dimX=10; dimY=10;
x_wb = logmfe_lpc_abe(x_nb, inp_feature, past_frames, future_frames, dimX, dimY);

if size(x_wb,1)==1
Expand Down
17 changes: 13 additions & 4 deletions stimuli/StimuliGeneration.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
%% Generation of the stimuli for the listening experiments

clc; close all; clearvars;
% Make BWE results reproducible
rng(17); % Tiny artifact in male /u/


%%
addpath('../include')
addpath('../include/bandwidth_extension')
Expand All @@ -9,7 +13,7 @@

load('filters.mat');

plot_blended_tf = true;
plot_blended_tf = false;

%% Transfer functions
tf_mm_path = '../transfer-functions/multimodal';
Expand Down Expand Up @@ -78,9 +82,14 @@
Ug.male = Ug.male .* p_male;
Ug.female = Ug.female .* p_female;

% Add initial and final silence
Ug.male = padarray(Ug.male, floor(sil_s * Fs_out), 'both');
Ug.female = padarray(Ug.female, floor(sil_s * Fs_out), 'both');
% Add final silence
Ug.male = padarray(Ug.male, floor(sil_s * Fs_out) - length(Ug.male) + length(natural_ref.pressure_contour), 'post');
Ug.female = padarray(Ug.female, floor(sil_s * Fs_out) - length(Ug.female) + length(natural_ref.pressure_contour), 'post');

% Add initial
Ug.male = padarray(Ug.male, floor(sil_s * Fs_out), 'pre');
Ug.female = padarray(Ug.female, floor(sil_s * Fs_out), 'pre');

%% Synthesize
playlist = {};
for file = tf_mm_files'
Expand Down
Binary file modified stimuli/dev/f_a_MM_1d_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/f_a_MM_1d_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/f_a_MM_MM_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/f_a_MM_MM_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/f_a_MM_bwe_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/f_a_MM_bwe_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/f_e_MM_1d_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/f_e_MM_1d_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/f_e_MM_MM_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/f_e_MM_MM_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/f_e_MM_bwe_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/f_e_MM_bwe_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/f_i_MM_1d_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/f_i_MM_1d_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/f_i_MM_MM_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/f_i_MM_MM_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/f_i_MM_bwe_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/f_i_MM_bwe_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/f_o_MM_1d_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/f_o_MM_1d_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/f_o_MM_MM_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/f_o_MM_MM_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/f_o_MM_bwe_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/f_o_MM_bwe_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/f_u_MM_1d_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/f_u_MM_1d_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/f_u_MM_MM_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/f_u_MM_MM_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/f_u_MM_bwe_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/f_u_MM_bwe_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/m_a_MM_1d_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/m_a_MM_1d_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/m_a_MM_MM_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/m_a_MM_MM_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/m_a_MM_bwe_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/m_a_MM_bwe_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/m_e_MM_1d_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/m_e_MM_1d_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/m_e_MM_MM_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/m_e_MM_MM_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/m_e_MM_bwe_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/m_e_MM_bwe_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/m_i_MM_1d_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/m_i_MM_1d_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/m_i_MM_MM_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/m_i_MM_MM_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/m_i_MM_bwe_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/m_i_MM_bwe_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/m_o_MM_1d_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/m_o_MM_1d_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/m_o_MM_MM_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/m_o_MM_MM_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/m_o_MM_bwe_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/m_o_MM_bwe_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/m_u_MM_1d_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/m_u_MM_1d_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/m_u_MM_MM_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/m_u_MM_MM_pressed.wav
Binary file not shown.
Binary file modified stimuli/dev/m_u_MM_bwe_modal.wav
Binary file not shown.
Binary file modified stimuli/dev/m_u_MM_bwe_pressed.wav
Binary file not shown.
Binary file removed stimuli/dev/zf_o_MM_Peter_MM_modal.wav
Binary file not shown.
Binary file removed stimuli/dev/zf_o_MM_Peter_bwe_modal.wav
Binary file not shown.

0 comments on commit 0da559c

Please sign in to comment.