SignalLab2/vocoder.m

22 lines
447 B
Matlab

#################
#Created By: Gabriel LUCAS
#Created :28/03/2023 08:27:54
#
#Last modified: 29/03/2023 22:37:32
#
#
#
#
#################
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);