Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

voice record by matlab

Status
Not open for further replies.

FERMED

Newbie level 6
Joined
Apr 30, 2008
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,368
recording matlab

Hi,

Please help me to record voice by matlab in real time.

regards
 

voice recording in matlab

I'm not sure what you mean by real time, or where you want to record it, but maybe you can get some ideas from this little audio spectrum analyzer:

Code:
% Audio spectrum display. To exit, close the figure.
%
fs = 22050;                                 % sample rate, hertz
N = 1024;                                   % duration, samples
window = blackman(N);                       % weighting
window = window / mean(window);             % normalize it
gca;                                        % open the figure
while get(0,'CurrentFigure')                % while figure still open
  y = wavrecord(N, fs);                     % acquire some signal
  h = fft(y .* window);                     % transform
  plot(fs*(0:N/2)/N, 20*log10(max(2/N*abs(h(1:N/2+1)), 1e-10)));
  ylim([-160 20]); xlabel('Hertz'); ylabel('dB');
  drawnow;                                  % allow figure to update
end
 
matlab record

check help about waveread n waverecord in matlab
 
hi,I have a code, may be useful for you
here is the code:

fs=40000;
y=wavrecord(5*fs,fs);
plot(y);
size(y)
z=y(2*fs:3*fs);
size(z)
figure
plot(z)
Z=fft(z);
z2=fftshift(Z);
a=abs(z2);
figure
plot(a);
wavplay(y,fs)
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top