spectrogram matlab source code
#1

Thanks for your code............................................................
Reply
#2
spectrogram matlab source code

This is the code used for plotting each recorded word.
Only the start and end values of where the phoneme begins in each case where varied in each simulation.

%EEN 540 Acoustic Properties of Speech Source Code
%Project 1
%created by Sergio Teran


%Time Waveform
clear all;
[x,fs,bits] = wavread('be.wav');
t = 0:1/fsSadlength(x)-1)/fs;
figure(1);
subplot(3,2,1)
plot(t,x);
title('Time Waveform of the Word example'); xlabel('Time(s)');ylabel('Amplitude')


%Narrowband Spectrogram and WideBand Spectrogram
N = 512;
subplot(3,2,3)
spectrogram(x,hamming(N/4),round(0.9*N/4),N,fs);
title('NarrowBand Spectrogram');

N = 512;
subplot(3,2,5)
win = hamming(N);
spectrogram(x,win,round(0.97*N),N,fs);
title('Wideband spectrogram');

%--------------------------------------------------------------------------

%Time Waveform of Phoneme
xa = 0.06; % These values where varied according to the respective waveform of the word being plotted
xb = 0.17;
subplot(3,2,2)
plot(t,x)
xlim([xa xb])
title('Time Waveform of Phoneme ')
xlabel('Time (s)')
ylabel('Amplitude')

%Extracting 30 ms of the waveform
xstart = 0.05;
subplot(3,2,4)
plot(t,x)
xlim([(xstart) (xstart+.030)])
title('Time Waveform of 30 ms of the Phoneme')
xlabel('Time (s)')
ylabel('Amplitude')
sample=x(xstart*fsSadxstart+.030)*fs);

%Magnitude Spectrum and Linear Prediction Spectral Envelope
mag = abs(fft(sample,1024));
mag = mag(1:512);
freq = 0:8000/N:8000-1;
subplot(3,2,6)
plot(freq,db(mag/1024)); % divide by 1024 to normalize after fourier transform
axis tight; grid on; title('Magnitude Spectrum and Smoothed Spectral Envelope');
xlabel('Frequency (Hz)'); ylabel('|X(f)| (dB)');
hold on

%Smoothing - Linear Prediction
p=fs/1000 + 4;
[a,g]=lpc(sample,p);
lspec = freqz(g,a,freq,fs);
subplot(3,2,6)
plot(freq, 20*log10(abs(lspec)),'k');
axis tight;
title('Magnitude Spectrum in Blue & Smoothed Spectral Envelope in Black');

%3D PLOT as a function of Time, Frequency and Power Density
figure(2)
fD = 0:8000/N:8000-1;
fD = fD';
[S,F,T,W] = SPECTROGRAM(x,hamming(N),floor(N/9),fD,fs);
[a,b]=meshgrid(-2:1:2,-2:1:2);
surf(freq,T,db(abs(W'))); hold on;
title('3-D plot of recorded word')
xlabel('Frequency, Hz');
ylabel('Time, s');
zlabel('Power Spectral Density, dB');
h = surf(freq,T,db(abs(W')));
set(h,'edgecolor','none')
colorbar
shading interp
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: jag mag purthi 7, panasonic ptae 8000, spectrogram matlab source code, write a matlab function that computes the spectrogram, spectrogram plot matlab, who is sergio garcias, volume rtdx m for spectrogram plot using rtdx with matlab,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  simple java rmi chat application source code 2 18,980 20-07-2018, 12:08 PM
Last Post: Guest
  authentication schemes for session passwords using color and images project source code 2 2,231 03-02-2018, 09:35 AM
Last Post: Nischithnash
  free download source code for online movie ticket booking in java 2 18,490 15-08-2017, 03:21 PM
Last Post: Morshed
  source code for rsa encryption and decryption in java 2 7,928 29-05-2017, 04:21 PM
Last Post: Meghna Jadhav
  image encryption and decryption using rsa algorithm in matlab 2 7,828 29-05-2017, 04:17 PM
Last Post: Priyanka Bidikar
  download liver tumor ct scan image in matlab with source code 4 7,986 21-05-2017, 09:54 PM
Last Post: abdulrahmanmashaal
  online cab booking source code in asp net 3 7,862 11-05-2017, 10:39 AM
Last Post: jaseela123d
Thumbs Up online catering management system on php with report and source code and ppt 4 8,718 29-04-2017, 10:59 AM
Last Post: jaseela123d
  MATLAB codes needed for powerline communication 1 7,995 12-04-2017, 05:00 PM
Last Post: jaseela123d
  source code for task scheduling using genetic algorithm using java 2 8,446 11-04-2017, 08:31 PM
Last Post: Guest

Forum Jump: