by Devin Yang
(This article was automatically translated.)

Published - 4 years ago ( Updated - 4 years ago )

Query available microphones
You can use arecord -l to list all microphones
root@raspberrypi:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: CameraB404271 [USB Camera-B4.04.27.1], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: B20 [BLUE USB Audio 2.0], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Recording
Choose to use card 1 to record cd-quality sound, -d will automatically stop after 5 seconds (48k 16bit)
arecord -D plughw:1 -d 5 -c 4 -r 48000 -f S16_LE test.wav


Choose to use card 2 to record high-quality sound (192k 24bit)
#192k 24bit
arecord -D plughw:2 -c 4 -r 192000 -f S24_LE test.wav

Play
aplay test.wav

Tags:

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


laravel,ModelFactory

How do I use ModelFactory to create Chinese fake data in Laravel

In Laravel, how to use ModelFactory to create Chinese fake data? In this content, I introduce the way I tried it out, Come in quickly for reference..

docker

How to simply use Docker to create an internet command line speed test program?

How to simply use Docker to create an internet command line speed test program? Here we use the python program speedtest-cli Will use Docker for the main use case, for example, I want to test the speed in my NAS, Although there is python in my NAS, but there is no pip command, it feels much safer to use Docker at this time. Of course, your NAS needs to be able to run Docker :). Or, I am in a MacOS environment, and I don't want to install speedtest-cli into my MacOS. At this time, it is not bad to use Docker to build a simple execution environment by yourself.

dlaravel,docker

D-Laravel learning three stages

Chat about the three stages of using D-Laravel, why use D-Laravel. Because the configuration files used by D-Laravel are quite simple, it is very suitable for beginners of Docker to learn, And users who do not know how to use Docker can also use the two commands ./console and ./create to create a project.