Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Aim: To plot the spectrogram of the given speech signal

Software requirement: Matlab


Program:
clc;
close all;
clear all;
[y,fs,bits] = wavread('arctic_a0001.wav');
soundsc(y,fs);
colormap('gray'); map = colormap; imap = flipud(map);
M = round(0.02*fs);
N = 2^nextpow2(4*M);
w = 0.54 - 0.46 * cos(2*pi*[0:M-1]/(M-1));
colormap(imap);
spectrogram(y,bits);
colormap(imap);
title('Spectogram');
ylim([0,(fs/2)/1000]);
Output:

You might also like