seerick
Posts: 3
Joined: Sat Mar 05, 2016 1:33 am

arecord microphone creates empty wav file

Sat Mar 05, 2016 1:35 am

Having trouble testing my USB microphone. Using audio jack for output and can aplay wav files but when I arecord in any format I get a wav file with no audio on it.

I've tried: arecord -f cd -D plughw:1 -d 10 a.wav arecord -v -D plughw:1,0 -f S16_LE --duration=10s rectest.wav

Both produce an empty wav.

Can anyone tell me what I might be missing?

Settings:

Code: Select all

pi@raspberrypi /var/log $ arecord -l

 **** List of CAPTURE Hardware Devices ****
 card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
 Subdevices: 1/1
 Subdevice #0: subdevice #0

 pi@raspberrypi /var/log $ sudo lsusb

 Bus 001 Device 005: ID 17ef:6082 Lenovo 
 Bus 001 Device 004: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio    Controller
 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

 pi@raspberrypi /var/log $ amixer
 Simple mixer control 'PCM',0
 Capabilities: pvolume pvolume-joined pswitch pswitch-joined
 Playback channels: Mono
 Limits: Playback -10239 - 400
 Mono: Playback 400 [100%] [4.00dB] [on]

 pi@raspberrypi /var/log $ cat /usr/share/alsa/alsa.conf
 #part

 defaults.ctl.card 1
 defaults.pcm.card 1
 defaults.pcm.device 0
 defaults.pcm.subdevice -1
 defaults.pcm.nonblock 1
 defaults.pcm.compat 0
 defaults.pcm.minperiodtime 5000        # in us
 defaults.pcm.ipc_key 5678293
 defaults.pcm.ipc_gid audio
 defaults.pcm.ipc_perm 0660
 defaults.pcm.dmix.max_periods 0
 defaults.pcm.dmix.rate 48000
 defaults.pcm.dmix.format "unchanged"
 defaults.pcm.dmix.card defaults.pcm.card


 .asoundrc

  pcm.!default {
   type hw
   card 1
     }

 ctl.!default {
   type hw
    card 1
   }


 pi@raspberrypi ~/Desktop $ arecord -v -D plughw:1,0 --duration=10s rectest.wav
 Recording WAVE 'rectest.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
 Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
 Converter: linear-interpolation
 Protocol version: 10002
 Its setup is:
   stream       : CAPTURE
   access       : RW_INTERLEAVED
   format       : U8
   subformat    : STD
   channels     : 1
   rate         : 8000
   exact rate   : 8000 (8000/1)
   msbits       : 8
   buffer_size  : 4000
   period_size  : 1000
   period_time  : 125000
   tstamp_mode  : NONE
   period_step  : 1
   avail_min    : 1000
   period_event : 0
   start_threshold  : 1
   stop_threshold   : 4000
   silence_threshold: 0
   silence_size : 0
   boundary     : 262144000
 Slave: Hardware PCM card 1 'USB PnP Sound Device' device 0 subdevice 0
 Its setup is:
   stream       : CAPTURE
   access       : MMAP_INTERLEAVED
   format       : S16_LE
   subformat    : STD
   channels     : 1
   rate         : 48000
   exact rate   : 48000 (48000/1)
   msbits       : 16
   buffer_size  : 24006
   period_size  : 6000
   period_time  : 125000
   tstamp_mode  : NONE
   period_step  : 1
   avail_min    : 6000
   period_event : 0
   start_threshold  : 6
   stop_threshold   : 24006
   silence_threshold: 0
   silence_size : 0
   boundary     : 1573257216
   appl_ptr     : 0
   hw_ptr       : 0


Return to “Raspberry Pi OS”