getaudiodata
Store recorded audio signal in numeric array.
📝 Syntax
y = getaudiodata(recorder)
y = getaudiodata(recorder, dataType)
📥 Input argument
recorder - audiorecorder object: audio recorder object created by audiorecorder.
dataType - string or character vector: data type of output audio signal. Valid values: 'double' (default), 'single', 'int16', 'int8', 'uint8'.
📤 Output argument
y - numeric array: audio signal data. Number of columns depends on channel count.
📄 Description
getaudiodata returns recorded audio data from an audiorecorder object as a numeric array.
y = getaudiodata(recorder) returns the audio data as a double array.
y = getaudiodata(recorder, dataType) returns the audio data converted to the specified data type.
The number of columns in y matches the number of channels in the recording (1 for mono, 2 for stereo).
The value range of y depends on dataType:
int8
-128 to 127
uint8
0 to 255
int16
-32,768 to 32,767
single or double
-1 to 1
💡 Examples
Get Data from Audio Recorder Object
Get audio as int8 array
🔗 See also
🕔 History
1.16.0
initial version
Last updated
Was this helpful?