The following methods control the recording process.
Record audio without blocking using the audiorecorder object recorder until stopped or paused by the stop or pause method.
Given the optional argument length, record for length seconds.
Record audio with blocking (synchronous I/O).
The length of the recording in seconds (length) must be specified.