1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-16 07:15:52 +02:00
tldr/pages/linux/arecord.md

29 lines
850 B
Markdown
Raw Normal View History

2020-09-09 07:56:16 +08:00
# arecord
> Sound recorder for ALSA soundcard driver.
> More information: <https://manned.org/arecord>.
2020-09-09 07:56:16 +08:00
- Record a snippet in "CD" quality (finish with `<Ctrl c>` when done):
2020-09-09 07:56:16 +08:00
`arecord -vv --format=cd {{path/to/file.wav}}`
- Record a snippet in "CD" quality, with a fixed duration of 10 seconds:
`arecord -vv --format=cd --duration={{10}} {{path/to/file.wav}}`
- Record a snippet and save it as an MP3 (finish with `<Ctrl c>` when done):
2020-09-09 07:56:16 +08:00
`arecord -vv --format=cd --file-type raw | lame -r - {{path/to/file.mp3}}`
- List all sound cards and digital audio devices:
`arecord --list-devices`
- Allow interactive interface (e.g. use `<Space>` or `<Enter>` to play or pause):
`arecord --interactive`
- Test your microphone by recording a 5 second sample and playing it back:
`arecord -d 5 test-mic.wav && aplay test-mic.wav && rm test-mic.wav`