Audio Capture

Capture audio from the device microphone


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