Pre-emphasis filter

조회 수: 6 (최근 30일)
sara s
sara s 2011년 12월 10일
답변: Kinza 2024년 6월 4일
Hello everybody
My question is:-
firstly,I should record any speech signal with 8KHZ and 8 bit and I don't know how can I apply speech signal with (8KHZ and 8 bit) and then I must pass this speech signal throw pre-emphasis filter and finaly I listen to the differencr after and before filtering. But another confusing thing for me that my pro said I must use cinvolution in my program
And I did my program but I'm not sure from it because I have error like this
??? Error using ==> conv at 27 A and B must be vectors.
Error in ==> speech2 at 18 s3=conv(s1,ypre);
and I don't know how can I add 8kHZ and 8 bit in true form in my program
The program:-
f=8000;
apre=[1];
[s1,f]=wavread('C:\Users\N\Desktop\family.wav');
figure(1)
plot(s1)
title('speech signal');
sound(s1,f);
pause
% design pre-emphasis filter
bpre=[1 -0.95];
fvtool(bpre,apre);
ypre=filter(bpre,apre,s1);
figure(2)
plot(ypre);
title('First filter response');
sound(ypre,f);
pause
s3=conv(s1,ypre);
figure(3);
plot(s3);
title('speech after filtering');
sound(m,fs);
pause
  댓글 수: 1
Sivaji Thammisetty
Sivaji Thammisetty 2018년 3월 12일
Send code for pre emphasis by matlab

댓글을 달려면 로그인하십시오.

채택된 답변

Andrei Bobrov
Andrei Bobrov 2011년 12월 10일
try
s3 = cell2mat(arrayfun(@(x)conv(s1(:,x),ypre(:,x),'same'),1:2,'un',0));
or
s3 = zeros(size(s1));
for j1 = 1:size(s1,2)
s3(:,j1) = conv(s1(:,j1),ypre(:,j1),'same');
end
  댓글 수: 2
sara s
sara s 2011년 12월 10일
Thanks a lot Teacher andrei but I want to know,how can I use 8 bit inside my program,my prof said this instruction must be included in the program
[t1,t2]=freqz(h,1,1024)
and I don't know how can I included this instruction inside my program and what is the benefit of it in the program.
Thanks in advance
sara s
sara s 2011년 12월 11일
Please,help me in the second part!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Kinza
Kinza 2024년 6월 4일
i have to process a recorded audio like "One Two Three Four Five" in MATLAB for a processor but i am confusing how to choose specific pre emphasis filter"

카테고리

Help CenterFile Exchange에서 Simulation, Tuning, and Visualization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by