Answered By: Allan Quito
Last Updated: Apr 10, 2022     Views: 66

There is currently no api interface for audio recording. You can use the following system commands to implement recording-related functions:

1. Start / save recording. If there is no special requirement for the audio format (such as sampling rate, encoding), use "arecord -t wav xxx.wav" that is, record a wav format audio and save it in xxx.wav. * xxx.wav ** is the current path. You can write the path /xxx.wav (for example: "arecord -t wav ~ / test.wav" on the Raspberry Pi is at /home/pi/test.wav);

2. End recording. Automatic ending use "-d xx xx = xxx seconds", otherwise use ctrl + C ;

3. Play the recording file. Use "aplay path / xxx.wav".

At the same time, use  "man arecord" to see the official simple notes on the recording commands.

Contact Us

Singapore Institute of Technology

The Ngee Ann Kongsi Library
Level 5, W1 Campus Heart
1 Punggol Coast Road
Singapore 828608

T: +65 6592 1215
E: Library@SingaporeTech.edu.sg
WhatsApp: +65 8104 5445