0% found this document useful (0 votes)
59 views2 pages

Object Task 1:: 'Double'

The document outlines tasks for a digital signal processing lab involving audio signal processing in Matlab. It includes 6 tasks: 1) record and manipulate audio signals, 2) apply operations like multiplication, reversal, and square root, 3) resample a recorded audio file to different frequencies, 4) generate a stem plot from an audio file, 5) record and playback a 5 second 16-bit audio file, and 6) read an audio file and display metadata like sample points and duration. Matlab code is provided for each task.

Uploaded by

SaRosh Raees
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views2 pages

Object Task 1:: 'Double'

The document outlines tasks for a digital signal processing lab involving audio signal processing in Matlab. It includes 6 tasks: 1) record and manipulate audio signals, 2) apply operations like multiplication, reversal, and square root, 3) resample a recorded audio file to different frequencies, 4) generate a stem plot from an audio file, 5) record and playback a 5 second 16-bit audio file, and 6) read an audio file and display metadata like sample points and duration. Matlab code is provided for each task.

Uploaded by

SaRosh Raees
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Digital signal processing 2016-EE-113

LAB # 7
Object
To Process Audio signal using Matlab.

Task 1:Write MAtlab code to perform following task.


a) Record your utterance of ’we’ and play it.
b) Record your utterance of ‘you’ and play it.
c) Increase the amplitude of audio signal.
Code
fs=11025;
y=wavrecord(3*fs,fs,2,'double');
y=y*10;
wavplay(y,fs);

Task 2:Write a script to record your utterance and apply the following operation on signal
a) Multiply by -1
b) Reverse the signal
c) Multiply with 10
d) Replace the signal by its square root
e) Replace the signal by is square
Code
fs=8000;
y=wavrecord(5*fs,fs,2,'double');
a=y*-1;
b=flipud(y);
c=y*10;
d=vpa(sqrt(y),3);
e=y.^2;

Task 3:Write a Matlab script to record your voice with a sample rate of 32 KHz and 8 bits resolution.
Resample the audio at 16KHz, 8KHz, 4KHz, 2KHz, 1KHz and state difference
Code
fs=32000;
y=wavrecord(1*fs,fs,2,'uint8');
%%for Fs=16000
wavplay(y,16000)
%%for Fs=8000
wavplay(y,8000)
%%for Fs=4000
wavplay(y,4000)
%%for Fs=2000
wavplay(y,2000)
%%for Fs=1000
wavplay(y,1000)

Task 4:Write a Matlab code to read any file and generate its stem
Code
Fs=11025;
Fs2=8000;
[y Fs nbits]=wavread('Beep1.wav');
wavwrite(y,Fs,'B:\\Beep2.wav');
[y2 Fs2 nbits2]=wavread('B:\\Beep2.wav');
subplot(2,2,1);
stem(y);
subplot(2,2,2);

SIR SYED UNIVERSITY OF ENGINEERING AND TECHNOLOGY Page 1


Digital signal processing 2016-EE-113

stem(y2);
wavplay(y2,fs2)
subplot(2,2,[3 4]);
stem(abs(y-y2));

Task 5:Record and play back 5 second of 16 bits audio sampled at 11025 Hz.
Code
fs=11025;
y=wavrecord(5*fs,fs,2,'double');
wavplay(y,fs);

Task 6:Write a script file to read any audio file and display the following information.
a) No. of sample points
b) Sampling rate
c) Bit resolution
d) Time duration
Code
[y fs nbits]=wavread('chimes.wav')
[m d]=wavfinfo('chimes.wav')
t=54080/44100

Result

fs = 44100
nbits = 16
d = Sound (WAV) file containing: 54080 samples in 2 channel(s)
t = 1.2263

Conclusion: In this lab we perform audio processing and perform different frequencies
task using matlab

SIR SYED UNIVERSITY OF ENGINEERING AND TECHNOLOGY Page 2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy