Build an open future with us.

Invest in Mycroft and become a community partner.

No Audio Output on Picroft with Jabra 410


#21

Here are the contents of the file in the etc/mycroft directory.

{
  "play_wav_cmdline": "aplay -Dhw:0,0 %1",
  "play_mp3_cmdline": "mpg123 -a hw:0,0 %1",
  "enclosure": {
    "platform": "picroft"
  },
  "tts": {
    "mimic": {
      "path": "/usr/local/bin/mimic"
    }
  },
  "ipc_path": "/ramdisk/mycroft/ipc/",
  "hotwords": {
    "hey mycroft": {
      "module": "precise"
    }
  },
  "SkillInstallerSkill": {
    "path": "/opt/venvs/mycroft-core/bin/msm"
  }
}

FYI - When I open AlsaMixer, hit F6, I see the Jabra on Sound Card 1. When I select this the up and down arrows do move the volume indicator lights on the Jabra when on F3[Playback]. A small victory.

I then decided to try adding a line for listener according to the sound issues wiki. Unfortunately I can’t edit the file as it is read-only. I tried sudo but I can’t find any documentation that provides the root password for picroft?

So, alas, still no listening or speaking mycroft. Thanks for any help.


#22

These are the two lines that I’d recommend experimenting with, for instance try
"play_wav_cmdline": "aplay -Dhw:0,3 %1"

to get it to pick up source 3

Unfortunately audio is the hardest part for us to get working with Picroft :frowning:


#23

Wow - this is a little more work than I thought it would be. I specifically chose the Jabra based on the wiki as it indicated that it was one of the recommended choices.

A couple of issues seem to be getting in my way of resolving this.

Why can’t I save changes to mycroft.conf? I get an E212 Cannot open file for writing. Presumably I am not going to get far without being able to edit and save this file?

Why does ssh into the unit periodically reject the password “mycroft”. I just burned a clean SD and can only access the picroft through connected keyboard - “ssh pi@IP adddress” results in a password prompt but mycroft doesn’t work. Nor does raspberry that someone posted works or used to. This is particularly weird and not very encouraging.
It appears that the Jabra does move index numbers in the list-sources if you unplug it. I clean booted without it - then plugged it in and rebooted. It showed up once on index 2. Then I unplugged it again and rebooted and this time it showed up twice stereo on index 2 and mono on index 3. Does it matter which one of these I try to setup stereo or mono? I assumed mono because the speaker probably isn’t stereo.

@KathyReid - Thanks for all your help - are you the only one helping out on this forum?


#24

Hi Simon,

Unfortunately audio issues and getting Devices configured is one of the most frequent complaints we have with Picroft - and thank you for sticking with us so far.

mycroft.conf not saving

If you are having trouble saving changes to your mycroft.conf file then it usually indicates filesystem permission issues. Can you run the command ls -las in the directory in which your mycroft.conf is stored so I can see what the permissions are?

ssh being rejected

The Picroft ssh password is definitely mycroft - I’m not sure why it would be periodically rejecting, and understand your frustration. If this happens, check;

  • Is Picroft on the network? Your router may be able to show you ‘attached devices’ and you should be able to ping Picroft if it is on the network.
  • If Picroft is connected wirelessly, is it in range?

Jabra 410

The spec sheet for the 410 isn’t clear on whether it’s stereo or not, by my assumption is that it would be due to its HD sound quality.

Have you tried the experimental unstable image? I’ve had better results with this and the Jabra 410.

https://mycroft.ai/to/picroft-unstable


#25

Since I have had no luck with the released version or the beta from August, I thought I would try the new beta you linked to. Still no luck with this one out of the box. The auto setup does not play a sound and the microphone test does not work. Do you need to manually configure your Jabra 410 or does it work automatically after answering the startup questions.

Also, I do see red error messages during the startup - is there a way to find these logs and check these as they scroll past too quickly?

I notice that pacmd list-sources does not work under this beta release, or at least I can’t run it from the default login directory.

I was able to run aplay and arecord and got the following:

aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
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
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
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
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
default:CARD=USB
    Jabra SPEAK 410 USB, USB Audio
    Default Audio Device
sysdefault:CARD=USB
    Jabra SPEAK 410 USB, USB Audio
    Default Audio Device
front:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    Front speakers
surround21:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    Direct sample mixing device
dsnoop:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    Direct sample snooping device
hw:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    Direct hardware device without any conversions
plughw:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    Hardware device with all software conversions
(.venv) pi@picroft:~ $ arecord -L
-bash: record: command not found
(.venv) pi@picroft:~ $ 



arecord -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=USB
    Jabra SPEAK 410 USB, USB Audio
    Default Audio Device
sysdefault:CARD=USB
    Jabra SPEAK 410 USB, USB Audio
    Default Audio Device
front:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    Front speakers
surround21:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    Direct sample mixing device
dsnoop:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    Direct sample snooping device
hw:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    Direct hardware device without any conversions
plughw:CARD=USB,DEV=0
    Jabra SPEAK 410 USB, USB Audio
    Hardware device with all software conversions

This is what I see when I run ls -las in the etc\mycroft directory

total 12
4 drwxr-xr-x  2 root root 4096 Sep 12 02:36 .
4 drwxr-xr-x 88 root root 4096 Sep 12 07:23 ..
4 -rw-r--r--  1 root root  285 Sep 12 02:36 mycroft.conf

Finally I was able to resolve the ssh issue - another device was on the same IP. I had a device with a static IP that was in the range of the DHCP server. Don’t know why it wasn’t seeing it but I am able to ssh into the unit fine now.


#26

I have a fully operational Pycroft with the latest code released last week and using the
Jabra 410 USB conference speaker/microphone.

Briefly the steps were:

  1. Build a new Pycroft as per https://github.com/MycroftAI/enclosure-picroft/tree/stretch

  2. Run through the first time install wizard as normal.

  3. Reboot.

  4. As this point I had everything working except the speaker.
    (The microphone worked out of the box)

  5. Make the changes as below to DISABLE the onboard BCM2835 speaker
    hardware. This means the Jabra becomes Card 0 and the default.
    (I do plan to work with this further to see if I can leave the hardware
    enabled and change the default to the Jabra as card 1. This is yet to be
    started.

    Your best friend thorough this is the command alsa-info .
    When you run it respond ‘no’ to sending the data to the Alsa team to get
    to the file name containing your configuration details Save this, and refer to it for
    an exact description of your Alsa configuration.

Here are the steps. The steps include commands to cut/paste to run.

#1. Disable BCM2835 overlay from loading at boot time.
#- Edit /boot.config.txt

sudo cp -p /boot/config.txt /boot/config.txt.orig
sudo bash -c 'cat >> /boot/config.txt << __EOF
dtparam=audio=off
__EOF'
more /boot/config.txt
sudo shutdown -r now

#2. Force USB Audio to be card 0 I also forced the snd_bcm2835 to never be card 0 as well
#- Create /etc/modprobe.d/alsa-base.conf

sudo bash -c 'cat > /etc/modprobe.d/alsa-base.conf << __EOF
options snd_usb_audio index=0
options snd_bcm2835 index=-2
__EOF'
more /etc/modprobe.d/alsa-base.conf 
sudo shutdown -r now

#3. Change default to USB
#- Replace /etc/asound.conf

sudo mv /etc/asound.conf /etc/asound.conf.orig
sudo bash -c 'cat > /etc/asound.conf << __EOF
pcm.!default {
  type plug
  slave {
    pcm "hw:0,0"
  }
}

ctl.!default {
    type hw           
    card 0
}
__EOF'
cat /etc/asound.conf

#4. Replace ./audio_setup.sh created by the wizard so set Control 3 (Playback) to card 0

echo 'sudo amixer cset numid=3 "0"  > /dev/null' > ~/audio_setup.sh
echo "amixer set PCM 79%" >> ~/audio_setup.sh
bash ~/audio_setup.sh

#5. Test Output Audio with noise, then WAV files if they are on pycroft
#- First check the speaker volume. Use the -/+ on the Jabra and set it at about 75%
#- (Use control-C to stop if necessary)

cat /dev/urandom | aplay
speaker-test -t wav -c 2 -D hw:0

#6. Test Input Audio with noise (stop mycroft first to release the microphone driver)

mycroft-core/stop-mycroft.sh
cat /dev/urandom | arecord -d 5 /tmp/noise.wav
aplay /tmp/noise.wav

#7. Update /etc/mycroft/mycroft.conf to use the default alsa device.
# Use an editor and change lines 2 and 3 to look like this. ** Sorry no command here.

“play_wav_cmdline”: “aplay %1”,
“play_mp3_cmdline”: “mpg123 %1”,

#The entire default /etc/mycroft/mycroft.conf file shroud now look like:
#- /etc/mycroft/mycroft.conf

{
“play_wav_cmdline”: “aplay %1”,
“play_mp3_cmdline”: “mpg123 %1”,
“enclosure”: {
“platform”: “picroft”
},
“tts”: {
“mimic”: {
“path”: “/home/pi/mycroft-core/mimic/bin/mimic”
}
},
“ipc_path”: “/ramdisk/mycroft/ipc/”
}

#8. Do a final reboot to get everything started in a predictable manner.
sudo shutdown -r now

Hopefully it should all be working for you.


#27

This is great - thanks. I am getting closer.

Microphone works in initial setup. All commands up to step 5 work like a charm.
One question about 1. The commands append dtparam=audio=off right after dtparam=audio=on. Did you want me to remove the dtparam=audio=on?

Then in step 5
aplay default_mono.wav and aplay default_dual.wav return “No such file…”. I tried searching for these files but couldn’t find them

speaker-test -t wav -c 2 -D hw:0 - works! I get front right and front left spoken through the Jabra.

cat /dev/urandom | arecord -d 5 /tmp/noise.wav - Returns “arecord: main:788: audio open error: Device or resource busy”

I went ahead and made the changes to the mycroft.conf file in step 7 and restarted but I am still not getting verbal responses from mycroft.


#28

I’ve updated steps 5 and 6.

Step 5:- Before you do the speaker test, use the -/+ controls on the Jabra and set the volume about 75%

Step 6:- Mycroft has control of the microphone driver, so it needs to be stopped for the next test.

One other step I did do early in my testing, but did not include it in my notes was download the latest updates from GIT, including the Mimic engine:

mycroft-core/dev_setup.sh -fm

See how you go. I’ll grab another SD card and run through the procedure end to end, and make sure it’s repeatable.


#29

Ok, I ran through it again and it worked! Thank you for your help - I am sure I wouldn’t have figured it out on my own. I am now running the “mycroft-core/dev_setup.sh -fm” - hopefully everything will work after this. But I created a backup of my working build just in case.