diff --git a/comparison.png b/comparison.png new file mode 100644 index 0000000..3f42d2d Binary files /dev/null and b/comparison.png differ diff --git a/comparison_zoomed.png b/comparison_zoomed.png new file mode 100644 index 0000000..ac590d1 Binary files /dev/null and b/comparison_zoomed.png differ diff --git a/modulator_new.wav b/modulator_new.wav new file mode 100644 index 0000000..865f22e Binary files /dev/null and b/modulator_new.wav differ diff --git a/speech_analysis.m b/speech_analysis.m index b8fa301..877b5b7 100644 --- a/speech_analysis.m +++ b/speech_analysis.m @@ -5,10 +5,22 @@ % i between 1.95 and 2.05 t = (0:length(y)-1)/Fs; -#[pwr, dur] = frequencySpectrum(y, Fs, 0); -#xlabel("Timee (s)"); -#ylabel("Amplitude"); +%[pwr, dur] = frequencySpectrum(y, Fs, 0); +%xlabel("Timee (s)"); +%ylabel("Amplitude"); #spectrogram(y,Fs,5,5); -Fs = downsample(Fs ,4000); -audiowrite("modulator22.wav", y, Fs); \ No newline at end of file +Factor_of_reduction = 2; +y_down = downsample(y,Factor_of_reduction); +y_decimate = decimate(y,Factor_of_reduction); +audiowrite("modulator_new.wav", y_down, Fs/Factor_of_reduction); + +plot (t,y,'b') +hold on +t2 = (0:length(y_down)-1)/(Fs/Factor_of_reduction); +plot (t2,y_down,'r') +t3 = (0:length(y_decimate)-1)/(Fs/Factor_of_reduction); + +plot (t3,y_decimate,'g'); + +