Home Correctly way of windowing a speech signal correctly
Reply: 0

Correctly way of windowing a speech signal correctly

user983
1#
user983 Published in May 27, 2018, 3:35 am

I'm applying a Hamming window to a speech signal in order to perform features extraction of the audio sound.

The way I'm splitting the signal into frames is correct? Should I use a window overlap?

Here's my attempt using MATLAB:

clear
close all

[data,fs] = audioread('speech_demo.wav');

timeWindow   = 20e-3;
lengthWindow = round(timeWindow*fs); % number of samples per window

L       = lengthWindow;
w_start = 0;
w_end   = lengthWindow;
j = 1;
for k = 1:round(length(data)/lengthWindow)

    x = w_start:w_end-1;
    hold on
    plot(x,hann(lengthWindow),'r:');
    plot(x,data(x+1),'k.-')
    plot(x,data(x+1).*hamming(lengthWindow),'m.-')
    wSignal(j:L*k,:) = data(x+1).*hamming(lengthWindow);

    w_start = w_start + L;
    w_end   = w_start + L;
    j       = L*k+1;

end
set(gcf,'color','w')

The plot of the signals and the windows:

A zoom in:

Thank you.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.313525 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO