Record audio data using computer's audio device
AudioRecorder object records audio data
using the computer's audio device.
To record audio data using the computer's audio device:
Define and set up your audio recorder object. See Construction.
step to record audio data according
to the properties of
dsp.AudioRecorder. The behavior
step is specific to each object in the toolbox.
This System object™ buffers the data from a frame of data using the process illustrated by the following figure.
Starting in R2016b, instead of using the
H = dsp.AudioRecorder returns
an audio recorder object,
H, that records audio samples
using an audio input device in real-time.
H = dsp.AudioRecorder(' returns an audio recorder object,
with each property set to the specified value.
Device from which to acquire audio data
Specify the device from which to acquire audio data. The default
Number of samples per second read from audio device
Specify the number of samples per second in the signal as an integer. The default is 44100. This property is tunable.
Number of audio channels
Specify the number of audio channels as an integer. The default is 2.
Data type used by device
Specify the data type used by the device to acquire audio data
Source of Buffer Size
Specify how to determine the buffer size as
Specify as an integer the size of the buffer that the audio
recorder object uses to communicate with the audio device. This property
applies when you set the
Size of queue in seconds
Specify the length of the audio queue, in seconds. The default
To minimize latency, lower the
Number of samples in the output signal
Specify the number of samples in the audio recorder's output as an integer. The default is 1024.
Data type of the output
Select the output data type as
Enable output of overrun count
Source of device channel mapping
Specify whether to determine the channel mapping as
Device-to-data channel mapping
Vector of valid channel indices to represent the mapping between
device input channels and the data. The term Channel Mapping refers
to a 1-to-1 mapping that associates channels on the selected audio
device to channels of the data. When you record audio, channel mapping
allows you to specify which channel of the audio data directs input
to a specific channel of audio. By default, the
|step||Record audio from recording device|
|Common to All System Objects|
Create System object with same property values
Expected number of inputs to a System object
Expected number of outputs of a System object
Check locked states of a System object (logical)
Allow System object property value changes
To run your generated standalone executable application in Shell, you need to set your environment to the following:
This object implements the algorithm, inputs, and outputs described on the From Audio Device block reference page. The object properties correspond to the block parameters.