⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.m

📁 lpc算法在matlab下的运行
💻 M
字号:
clc; % clear the command line
clear all; % clear the workspace
%
% system constants
% ---------------
InputFilename = 's2ofwb.wav'; %change it according to your wave files 

[inspeech, Fs, bits] = wavread(InputFilename); % read the wavefile

outspeech1 = speechcoder1(inspeech); 
outspeech2 = speechcoder2(inspeech);

%the simple was clipping. Added this (DSE)
outspeech1=outspeech1./(max(outspeech1).*1.05);


% display the results
figure(1);
subplot(3,1,1);
plot(inspeech);
grid;
subplot(3,1,2);
plot(outspeech1);
grid;
subplot(3,1,3);
plot(outspeech2);
grid;




if 1==0
  disp('Press a key to play the original sound!');
  pause;
  soundsc(inspeech, Fs);
  
  disp('Press a key to play the LPC compressed sound!');
  pause;
  soundsc(outspeech1, Fs);
  
  disp('Press a key to play the voice-excited LPC compressed sound!');
  pause;
  soundsc(outspeech2, Fs);
else %write to disk
  wavwrite(outspeech1,Fs,sprintf('simple_lpc%s',InputFilename));
  wavwrite(outspeech2,Fs,sprintf('voice_excited_lpc%s',InputFilename));
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -