%spectralflatnessdemo.m
clc;
clear all;
close all;
[A,FS]=audioread('D:\GOPI\DIGITAL_SPEECH_PROCESSING_USING_MATLAB\data\train\s2.wav');
[res1,res2,speechsegment,utforste,ltforste,ltforzcr]=...
endpointdetection(A',FS);
for i=9:1:150
S{i}=blkproc(speechsegment,[1 FS*30*10^(-3) ],'spectralflatness(x,P1)',i);
end
for i=9:1:150
E{i}=blkproc(speechsegment,[1 FS*30*10^(-3) ],...
'spectralflatnesserror(x,P1)',i);
end
figure
for i=9:1:9
for j=1:1:21
subplot(5,5,j)
plot(E{i}(:,j))
end
end
figure
for i=150:1:150
for j=1:1:21
subplot(5,5,j)
plot(E{i}(:,j))
end
end
S1=cell2mat(S');
figure
imagesc(S1)

