I am trying to figure out how to use the audiorecorder class in order to make some recording from within octave code, but I can’t get any success. Can anyone share some code snippet, please?
I have found the available audio devices in my system with
audiodevinfo to figure out the ID of the device I want to use.
>> DEVINFO = audiodevinfo (); >> DEVINFO.input(2) ans = scalar structure containing the fields: Name = WEB CAM: USB Audio (hw:1,0) (ALSA) DriverVersion = ALSA ID = 6 >>
then I am making an audio recorder object and attempting to record with the following code
>> rec = audiorecorder (16000, 8, 1, 6); >> audiosample = record (rec, 5); error: record: function called with too many outputs error: called from record >>
Obviously I am missing something here.
Any help or a working example would be very helpful to get me started.