layeh / barnard

barnard is a terminal-based client for the Mumble voice chat software
GNU General Public License v2.0
150 stars 46 forks source link

No sound was recorded and transmitted. #47

Open Luupw3d opened 3 years ago

Luupw3d commented 3 years ago

I'm using an USB sound card and I test my microphone and headphone by using sox. All of them works well. Here's my arecord-l outputs:

pi@raspberrypi:~` $ arecord -l List of CAPTURE Hardware Devices card 1: Camera [H264 USB Camera], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: Audio [USB Audio], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0

Here's my .asoundrc

pcm.output { type hw card 2 } ctl.!default { type hw card 2 }

When I was using barnard, the headphone was working ,but the microphone does not seem to be working. I could hear other people talking but others could not hear me.

By the way , is this project EOL?

zrdimetc commented 2 years ago

Test your audio input and output before running barnard with arecord -F CD | aplay. Can you hear yourself speaking? If you can't hear yourself, your local ALSA config is wrong. Try without .asoundrc (backup or remove) by adjusting global ALSA config /usr/share/alsa/alsa.conf for correct device.

defaults.ctl.card 2
defaults.pcm.card 2

if "2" is your card number. If "0" or "1" adjust accordingly. Check sound cards with aplay -l. If you really need to use local ALSA .asoundrc, you seem to be missing the input. Try this .asoundrc config

pcm.!default {
  type asym
  capture.pcm "mic"
  playback.pcm "speaker"
}

pcm.mic {
  type plug
  slave {
    pcm "hw:2,0"
  }
}

pcm.speaker {
  type plug
  slave {
    pcm "hw:2,0"
  }
}

When you configure ALSA global or local config correct for input, barnard will work fine.