0% found this document useful (0 votes)
115 views2 pages

Create Object For Recording - MATLAB Audiorecorder

The document provides instructions for creating an audio recorder object in MATLAB to record audio. It explains that the audiorecorder function creates a recorder with specified sampling frequency (Fs), bit depth, number of channels, and device ID. It then gives the default values and valid options for each parameter. The document concludes by providing an example algorithm to record 5 seconds of audio, get the audio data, and either play, display, or take the FFT of the recorded signal.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
115 views2 pages

Create Object For Recording - MATLAB Audiorecorder

The document provides instructions for creating an audio recorder object in MATLAB to record audio. It explains that the audiorecorder function creates a recorder with specified sampling frequency (Fs), bit depth, number of channels, and device ID. It then gives the default values and valid options for each parameter. The document concludes by providing an example algorithm to record 5 seconds of audio, get the audio data, and either play, display, or take the FFT of the recorded signal.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Create object for recording - MATLAB audiorecorder

Recorder = audiorecorder
Recorder = audiorecorder
(Fs,nBits,nChannels,ID)
Recorder = audiorecorder creates an 8000 Hz,
bit, 1-channel audiorecorder object.

8-

Sampling Frequency (Fs) = 8000,8000,11025,


22050,44100,48000,96000Hz.
Default: 8000
nBits = Bits per sample. Valid values depend on
the audio hardware installed: 8, 16, or 24.
Default:
8
nChannels = The number of channels: 1 (mono) or
2 (stereo).
Default: 1
ID = Device identifier. To obtain the ID of a device,
use the audiodevinfo function.
Default: -1 (default device)

Algorithm for Auidorecorder

a = auidorecorder (8000, 8, 1)

record(a,5);

b = getaudiodata(a);

play(b,8000)

sound(b)

If we want plot the signal then

plot(b)

If we want fft of this signal then

c = fft(b);

plot(abs(c));

Code for FFT For given Data


Import Data first then Apply
X = abs(fft(double(H01)));
plot(X)

You might also like