Voiced and Unvoiced Frames

Anyone can help me to make the code from this picture? Thank you

5 comentarios

Mathieu NOE
Mathieu NOE el 10 de Mzo. de 2021
hello
maybe this can be a starting point... just remembered I had this code around (zero crossing rate)
%% Read the input signal
[y, fs] = audioread('test_voice.wav');
N = length(y);
t = (0:N-1)/fs;
framelen = 128;
numframes = floor(N/framelen);
overlap = 0;
zcr = [];
for k = 1:numframes
frame = y((k-1)*framelen+1 : framelen*k) ;
arry = sign(frame(2:framelen)) - sign(frame(1:framelen-1));
zcr_frame = sum(abs(arry));
zcr = [zcr; zcr_frame] ;
end
% normalisation
zcr = zcr./max(zcr);
y = y./max(abs(y));
figure (1);
% t_zcr = (0:framelen:N-framelen)/fs ; % time stamp positionned at beginning of frame
t_zcr = (framelen/2:framelen:N-framelen/2)/fs ; % time stamp positionned at center of frame
plot(t,y,'b',t_zcr,zcr -1.5,'r');grid on;
xlabel('time(secs)'); ylabel('linear output')
Winda Mariana
Winda Mariana el 11 de Mzo. de 2021
Thank you so much
can you help me from the hamming window, please?
Mathieu NOE
Mathieu NOE el 11 de Mzo. de 2021
hello
sure ; this is the new code with hamming window applied on each frame (the window length must be equal to the frame length)
clear all; clc; close all;
%% Read the input signal
[y, fs] = audioread('test_voice.wav');
N = length(y);
t = (0:N-1)/fs;
framelen = 128;
window = hamming(framelen); % hamming windowing
numframes = floor(N/framelen);
overlap = 0;
zcr = [];
for k = 1:numframes
frame = y((k-1)*framelen+1 : framelen*k) ;
frame = frame.*window; % hamming windowing
arry = sign(frame(2:framelen)) - sign(frame(1:framelen-1));
zcr_frame = sum(abs(arry));
zcr = [zcr; zcr_frame] ;
end
% normalisation
zcr = zcr./max(zcr);
y = y./max(abs(y));
figure (1);
% t_zcr = (0:framelen:N-framelen)/fs ; % time stamp positionned at beginning of frame
t_zcr = (framelen/2:framelen:N-framelen/2)/fs ; % time stamp positionned at center of frame
plot(t,y,'b',t_zcr,zcr -1.5,'r');grid on;
xlabel('time(secs)'); ylabel('linear output')
Winda Mariana
Winda Mariana el 11 de Mzo. de 2021
Editada: Winda Mariana el 11 de Mzo. de 2021
Thankyou so much
Can you help me to make for this code? I'm really need it for my final project🙏
Yashender Sharma
Yashender Sharma el 18 de Mzo. de 2021
There are a lot of similar questions, you can browse MATLAB Central(MATLAB Answers, File Exchange etc.). Here's a link to similar question I've answered recently

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Psychology en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 10 de Mzo. de 2021

Comentada:

el 18 de Mzo. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by