W3cubDocs

/Octave

33.4.2 Data Retrieval

The following methods allow you to retrieve recorded audio data in various ways.

data = getaudiodata (recorder)
data = getaudiodata (recorder, datatype)

Return recorder audio data as a matrix with values between -1.0 and 1.0 and with as many columns as there are channels in the recorder.

Given the optional argument datatype, convert the recorded data to the specified type, which may be one of "double", "single", "int16", "int8" or "uint8".

player = getplayer (recorder)

Return an audioplayer object with data recorded by the audiorecorder object recorder.

player = play (recorder)
player = play (recorder, start)
player = play (recorder, [start, end])

Play the audio recorded in recorder and return a corresponding audioplayer object.

If the optional argument start is provided, begin playing start seconds in to the recording.

If the optional argument end is provided, stop playing at end seconds in the recording.

© 1996–2018 John W. Eaton
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions.
https://octave.org/doc/interpreter/Data-Retrieval.html