Skip to content

Instantly share code, notes, and snippets.

@koji
Created June 22, 2018 19:35
Show Gist options
  • Save koji/122f8ba40ff12574974093d3d949cab0 to your computer and use it in GitHub Desktop.
Save koji/122f8ba40ff12574974093d3d949cab0 to your computer and use it in GitHub Desktop.
sound recording with raspberry pi3
$ lsusb

Bus 001 Device 004: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 001 Device 005: ID 045e:0745 Microsoft Corp. Nano Transceiver v1.0 for Bluetooth
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$ arecord -l

**** List of CAPTURE Hardware Devices ****
card 0: sndrpigooglevoi [snd_rpi_googlevoicehat_soundcar], device 0: Google voiceHAT SoundCard HiFi voicehat-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

record sound
$ arecord -D plughw:1,0 mic.wav

if the above gets an error
$ arecord --device=plughw:0,0 --format S16_LE --rate 44100 -c1 test.wav

play sound
aplay test.wav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment