This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Audio Capture

Capture audio from the device microphone

Description

The block outputs the left and right audio channels as an N-by-2 int16 matrix, where N is the number of samples per frame and the columns represent the left and right channels, respectively. The Frame size (N) parameter determines the value of N.

The sample time of the block is derived from Frame Size and Audio Sampling frequency. For example, if the Audio Sampling frequency is 44100 Hz and the Frame Size is 4410, then the sample time is 4410/44100 = 0.1s.

During simulations without hardware, this block outputs zeros. See Block Produces Zeros or Does Nothing in Simulation (Simulink).

Dialog Box

Audio Sampling frequency (Hz)

Specify the sample rate of the device microphone. The default value is 44100 Hz.

Frame size (N)

Specify the number of audio samples, N, per frame.

Introduced in R2015a