alexylem / jarvis

Jarvis.sh is a simple configurable multi-lang assistant.
http://openjarvis.com
MIT License
810 stars 197 forks source link

JABRA 510 - Microphone #958

Closed Breixo7 closed 5 years ago

Breixo7 commented 5 years ago

Description

Hi guys, Im looking for some help because actually I feel super stuck and tried every solutions posted before and is not working for me. My problem is with that record_hw is empty (attached log).

Steps followed from here https://github.com/alexylem/jarvis/issues/65 and https://github.com/alexylem/jarvis/issues/61, but still nor working.

tried:

jarvis -i but rewrites asoundrc again

also tried to change alsa-base.conf as some user suggest

$cat /etc/modprobe.d/alsa-base.conf
# This sets the index value of the cards but doesn't reorder.
options snd_usb_audio index=0
options snd_bcm2835 index=1

# Does the reordering.
options snd slots=snd_usb_audio,snd_bcm2835

and I received this error if I try to configure again with 1 0. I tried everything, is like an infinite loop.

ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
rec FAIL sox: Sorry, there is no default audio device configured
Selection of the microphone device
**** List of CAPTURE Hardware Devices ****
card 0: USB [Jabra SPEAK 510 USB], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Indicate the card # to use [0-9]:

Logs

jarvis@raspberrypi:/jarvis/jarvisIA $ ./jarvis.sh
Notice: you can use 'jarvis' instead of './jarvis.sh'
cat: /proc/asound/cardj/id: No such file or directory

------------ Config ------------
jv_branch            master
jv_version
jv_arch              armv7l
jv_os_name           raspbian
jv_os_version        10
language             es_ES
play_hw              hw:jabbra
rec_hw
speaker
microphone           Default
recorder             sox
trigger_stt          false
command_stt          snowboy
tts_engine           svox_pico
--------------------------------

No mic configured, forcing keyboard mode
DEBUG: program_startup hook
DEBUG: start_speaking hook "Hola"
Jarvis: Hola
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
play FAIL formats: can't open output file `default': snd_pcm_open error: No such device
ERROR: play command failed
HELP: Verify your speaker in Settings > Audio > Speaker
DEBUG: program_exit hook

$cat ~.//.asoundrc

pcm.!default {
  type asym
   playback.pcm {
     type plug
     slave.pcm "hw:jabbra"
   }
   capture.pcm {
     type plug
     slave.pcm "hw:1,0"
   }
}

tried cat ~.//asoundrc from someone with jabra 510 that is working for him.

pcm.jabbra {
    type hw
    card 1
    device 0
    rate 48000
}
pcm.!default {
  type asym
   playback.pcm {
     type plug
     slave.pcm "jabbra"
   }
   capture.pcm {
     type plug
     slave.pcm "hw:1,0"
   }
}

$aplay -L

**** List of PLAYBACK Hardware Devices ****
card 0: USB [Jabra SPEAK 510 USB], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 1: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
jarvis@raspberrypi:/jarvis/jarvisIA $ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default
sysdefault:CARD=USB
    Jabra SPEAK 510 USB, USB Audio
    Default Audio Device
front:CARD=USB,DEV=0
    Jabra SPEAK 510 USB, USB Audio
    Front speakers
surround21:CARD=USB,DEV=0
    Jabra SPEAK 510 USB, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=USB,DEV=0
    Jabra SPEAK 510 USB, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=USB,DEV=0
    Jabra SPEAK 510 USB, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=USB,DEV=0
    Jabra SPEAK 510 USB, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=USB,DEV=0
    Jabra SPEAK 510 USB, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=USB,DEV=0
    Jabra SPEAK 510 USB, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=USB,DEV=0
    Jabra SPEAK 510 USB, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=USB,DEV=0
    Jabra SPEAK 510 USB, USB Audio
    Direct sample mixing device
dsnoop:CARD=USB,DEV=0
    Jabra SPEAK 510 USB, USB Audio
    Direct sample snooping device
hw:CARD=USB,DEV=0
    Jabra SPEAK 510 USB, USB Audio
    Direct hardware device without any conversions
plughw:CARD=USB,DEV=0
    Jabra SPEAK 510 USB, USB Audio
    Hardware device with all software conversions
sysdefault:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
dmix:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample mixing device
dmix:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample mixing device
dmix:CARD=ALSA,DEV=2
    bcm2835 ALSA, bcm2835 IEC958/HDMI1
    Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample snooping device
dsnoop:CARD=ALSA,DEV=2
    bcm2835 ALSA, bcm2835 IEC958/HDMI1
    Direct sample snooping device
hw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct hardware device without any conversions
hw:CARD=ALSA,DEV=2
    bcm2835 ALSA, bcm2835 IEC958/HDMI1
    Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Hardware device with all software conversions
plughw:CARD=ALSA,DEV=2
    bcm2835 ALSA, bcm2835 IEC958/HDMI1
    Hardware device with all software conversions

I will apreciate if someone have a solution. thanks so much in advance!

Breixo7 commented 5 years ago

Finally Solved!

I have repaired microphone but lost my sound :( but I finally solved this problem and want to share for the community.

I had used:

aplay -l to check card and dev speaker numbers, in my case 0 0

arecord -l to check card and dev microphone numbers, in my case 0 0

I had tested this command aplay --rate=16000 --channels=1 --format=S16_LE L.wav and I didnt hear anything, but the bar that shows "dbs" was moving

so, for some reason my speaker was muted? let's check it

first check controls name

amixer scontrols

Simple mixer control 'Master Front',0`

amixer sset Master Front unmute

then sound is unmuted again.

Congratulations for this awesome assistant!