0% found this document useful (0 votes)
141 views21 pages

DCT For Speech Compression

Podila Sangeeth Reddy presented a mini project on compressing speech signals using the discrete cosine transform (DCT). The presentation covered introducing speech compression and the DCT technique. It described the objectives, block diagram, MATLAB software used, algorithm, code, advantages, disadvantages, applications, and future scope of using DCT for speech signal compression. The code demonstrated reading a speech signal, applying the DCT, thresholding coefficients, reconstructing the signal, and calculating the error and signal-to-noise ratio.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
141 views21 pages

DCT For Speech Compression

Podila Sangeeth Reddy presented a mini project on compressing speech signals using the discrete cosine transform (DCT). The presentation covered introducing speech compression and the DCT technique. It described the objectives, block diagram, MATLAB software used, algorithm, code, advantages, disadvantages, applications, and future scope of using DCT for speech signal compression. The code demonstrated reading a speech signal, applying the DCT, thresholding coefficients, reconstructing the signal, and calculating the error and signal-to-noise ratio.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

KAKATIYA INSTITUTE OF TECHNOLOGY & SCIENCE WARANGAL-15

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING

A
Mini project Presentation
On

SPEECH SIGNAL COMPRESSION USING


DCT
By
PODILA SANGEETH REDDY
Roll no: B17EC015, 3ECE-1

Guide Coordinator Head of the department


Smt. S.P.Girija Sri A. Pavan Dr. B. Rama Devi
Associate Professor Asst. Prof Professor & Head
Dept
1 Of B17EC015
ECE Dept of ECE Dept of ECE
06/27/2020
Presentation Content
INTRODUCTION
OBJECTIVE
BLOCK DIAGRAM
SOFTWARE
ALGORITHM
CODE
ADVANTAGES
DISADVANTAGES
APPLICATIONS
FUTURE SCOPE
CONCLUSION

2 B17EC015 06/27/2020
INTRODUCTION
• Data compression is a technique in which data content of
input signal to system is compressed so that original signal is
obtained as output and unwanted or undesired signals are
removed. Therefore speech signals are used in form of data
it is termed as SPEECH COMPRESSION.
• Speech is very basic way for humans to convey information
to one another. Speech compression involves coding of real
time audio signal at lowest possible bit rates.
• Compression reduces usage of resources like storage space
and transmission capacity.

3 B17EC015 06/27/2020
OBJECTIVE
 speech compression is a process of lessening the dynamic
range between the dynamic and quietest parts of an audio
signal. This is done by boosting the quieter signal and
attenuating the louder signals. Speech compression enables
efficient storage and transmission of data.
 When DCT is applied to speech signal we get desired
compressed signal both signals are represented as
waveforms as follows.

input signal output signal

4 B17EC015 06/27/2020
DCT
For 1-D sequence, the DCT is given by

Where x=0, 1, - - - - - - -, N-1

Where a(u) can be defined as

5 B17EC015 06/27/2020
GENERAL BLOCK DIAGRAM
Speech
signal reconstruct
signal
Transform
technique
Inverse
Thresholdin transform
g
coefficients
De-
quantizatio quantization
n

Compresse decodin
encoding
d data g

6 B17EC015 06/27/2020
SOFTWARE USED
MATLAB R2020a
Math Works

7 B17EC015 06/27/2020
ALGORITHM

Step1: read the wave file.

Step2: divide the wave file and reshape into matrix form.

Step3: perform DCT operation.

Step4: arrange elements in the ascending order.

Step5: threshold value is set, discard the coefficients below this


value.

8 B17EC015 06/27/2020
ALGORITHM

Step6: convert the data type into float form

Step7: perform IDCT operation on coefficient matrix

Step8: zeros are inserted in the place of removed coefficients

Step9: reshape the matrix and play the reconstructed


wave file

9 B17EC015 06/27/2020
CODE
%reading the wave file
[y,Fs]=audioread('noicy.wav');
 soundsc(y,Fs); %to hear sound from speaker
 p = y;
a=size(p); %finding size of input
subplot(4,1,1);
plot(p); %plotting the input wave
title(‘input waveform’);
%applying DCT for the input signal to obtain DCT
coefficients
z= dct(p);

10 B17EC015 06/27/2020
CODE
subplot(4,1,2);
plot(z); %plotting DCT obtained DCT coefficients
title(‘input waveform after dct’);
%arranging DCT coefficients in descending order
[pp,psr] = sort(abs(z),'descend');
subplot(4,1,3);
plot(psr); %plotting the sorted
title(‘waveform plotting after sorting in descending
order’);
 
11 B17EC015 06/27/2020
CODE
%finding the coefficients representing 99 percent of
energy
flag = 1;
while norm(z(psr(1:flag)))/norm(z)<0.999
flag = flag+1;
end
 xp= flag/length(z)*100;
%initializing coefficients which representing 0.01 percent
of energy to zero
z(psr(flag+1:end)) = 0;

12 B17EC015 06/27/2020
CODE
%converting DCT matrix into .wav files by using IDCT
operation
xx = idct(z);
%finding size after compressing the signal
b=size(xx);
%plotting the compressed signal;
subplot(4,1,4);
plot(xx);
title(‘plotting after compressing the signal’);
soundsc(xx,Fs);

13 B17EC015 06/27/2020
CODE
w_double=double(xx);
o_double=double(p);
 %finding error
for j = 1:a;
s = s+(w_double(j)-o_double(j)) ;
end
display(s)
 %finding root mean square error
s=s^2;
c=sqrt(s)
 %finding signal to noise ratio
p=psnr(xx,p)

14 B17EC015 06/27/2020
OUTPUT
s =1.4825e-14
c =1.5e-17
p = 47.1516

15 B17EC015 06/27/2020
ADVANTAGES
 Speech signal compression using DCT is quick.
 It is useful for encoding speech at lower bit rate
 DCT is widely used in transforms in image and audio
compression algorithm.
 Its popularity is due mainly on the fact that it achieves a good
data compaction.
 Performance wise DCT is better than DWT

16 B17EC015 06/27/2020
DISDVANTAGES
 
 Wavelets and discrete wavelet transform works more
efficiently than DCT.
 In this only some bits are compressed
 Compression ratio in DCT is small when compared with DWT.

17 B17EC015 06/27/2020
APPLICATIONS
 Compression of speech is used in digital cellular technology
where many users can share same frequency bandwidth at a
particular time.

 It can also be used for digital voice storage that are used for
answering machines

 It is used for pre-recorded telephone calls that are used for


providing any kind of information to user.

18 B17EC015 06/27/2020
FUTURE SCOPE

• It can also be extended to video signal compression so that


fewer bits are occupied.
• It can be extended without loss of any information.
• It can extend to various complex transforms.

19 B17EC015 06/27/2020
CONCLUSION
 Speech signal compression can be done in many ways but
one of the simplest way of compression is by using discrete
cosine transform. In DCT we are finding the threshold
coefficients and reducing the size of speech signal.

 There are many other transform and techniques that are used
for speech signal compression but the simplest way is by
using DCT.

20 B17EC015 06/27/2020
21 B17EC015 06/27/2020

You might also like