From c0cd36be7e279627d8f9ad472447733b86a2aca6 Mon Sep 17 00:00:00 2001 From: Gabri6 Date: Thu, 30 Mar 2023 17:35:27 +0200 Subject: [PATCH] added implementation of chanvocoder --- vocoder.m | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/vocoder.m b/vocoder.m index 7c2efa5..0b71b55 100644 --- a/vocoder.m +++ b/vocoder.m @@ -9,4 +9,13 @@ # ################# -pkg load signal; \ No newline at end of file +pkg load signal; + +modfile = 'modulator22.wav'; +carfile = 'carrier22.wav'; +outfile = 'vocodedsound.wav' +[modul, sr1] = audioread(modfile); +[carrier, sr2] = audioread(carfile); +if sr1~=sr2, disp('your sampling rates dont match'); end +y = chanvocoder(carrier, modul, 512, 16, .2); +audiowrite(outfile, y, sr1);