How to record audio from microphone in bash-shell in linux?
That’s very easy if you know how 😉
First of all you have to install this little programs:
sudo apt install arecord lame -y
With this command you will install arecord that’s the recorder and lame. Lame is for transcoding to mp3 on the fly, because arecord only takes wav-files. This files can be very quickly very big 😉
And then send this command to record and transcode to mp3:
arecord -v -f cd -t raw | lame -r - output.mp3
That’s it! The mp3-file you can play with any music-player like vlc or mplayer.
Have fun 🙂
Schreibe einen Kommentar