前人栽树后人乘凉:记得关注
题目:
代码:
clc;
clear all;
%载入文件
[s,fs] = audioread('Male16k-2017.wav');
s=s(:);
%设置参数
tf = 0.02; % 20ms
frame = tf * fs; % 一帧信号的大小
overlap = 0.5; % 50%帧移
% 第一步先操作加窗但是没有overlapadd
% Find the number of LPC frames fram ---> frame * (1 - overlap)
LPC_num_frames = ceil(length(s) / (frame * (1-overlap))); % Number of frames for LPC
% pad the end of the signal with zeros so that is divides evenly
pad = LPC_num_frames * (frame * (1-overlap)) - length(s);
s = [s ; zeros(pad,1)]; % 0
inc = frame * (1-overlap); %set 帧移
% win = hamming(frame); %汉明窗 第一类型.