diff --git a/graph/fig0.png b/graph/fig0.png new file mode 100644 index 0000000..c32e371 Binary files /dev/null and b/graph/fig0.png differ diff --git a/speech_processing.m b/vocoded.m similarity index 59% rename from speech_processing.m rename to vocoded.m index b7b7e37..60933a2 100644 --- a/speech_processing.m +++ b/vocoded.m @@ -11,6 +11,7 @@ outfile = "vocodedsound.wav"; [carrier_w, sr2_w] = audioread(carfile); [carrier_wp, sr2_wp] = audioread(carfile); + if sr1 ~= sr2 disp('Your sampling rates dont match'); endif @@ -22,7 +23,27 @@ audiowrite("vocodedsound_w.wav", y, sr1); y_wp = chanvocoder(carrier_wp,modul, 512, 32, .2); audiowrite("vocodedsound_wp.wav", y, sr1); +%Plot +figure; +subplot(3,1,1); +plot(modul); +xlabel("TIme in [s]"); +ylabel("frequency in [dB]"); +legend(modfile); + +subplot(3,1,2); +plot(carrier,'-r'); +xlabel("TIme in [s]"); +ylabel("frequency in [dB]"); +legend(carfile); + +subplot(3,1,3); +plot(y,'-g'); +xlabel("TIme in [s]"); +ylabel("frequency in [dB]"); +legend(outfile); + %spectogram -frequencySpectrum(modul,sr1,1); -frequencySpectrum(carrier,sr2,1); -frequencySpectrum(y,sr1,1); \ No newline at end of file +%frequencySpectrum(modul,sr1,1); +%frequencySpectrum(carrier,sr2,1); +%frequencySpectrum(y,sr1,1); \ No newline at end of file