Hi,
this is my first post and I’m struggling to get my picroft working since 2 days with no success.
Configuration:
- Picroft 0.8 Image
- Raspberry Pi 3
- Microphone usb based on CM108
- Jack speaker powered by usb
I have mainly 2 issues.
-
When I try the command “Say Hello World” I get:
2017-07-17 10:52:30,392 - mycroft.configuration - DEBUG - Configuration ‘/usr/local/lib/python2.7/site-packages/mycroft_core-0.8.1-py2.7.egg/mycroft/configuration/mycroft.conf’ loaded
2017-07-17 10:52:30,393 - mycroft.configuration - DEBUG - Configuration ‘/etc/mycroft/mycroft.conf’ loaded
2017-07-17 10:52:30,398 - mycroft.configuration - DEBUG - Configuration ‘/home/pi/.mycroft/mycroft.conf’ not found
2017-07-17 10:52:31,729 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
2017-07-17 10:52:32,415 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 “GET /v1/device//setting HTTP/1.1” 401 38
2017-07-17 10:52:32,428 - mycroft.configuration - WARNING - Failed to fetch remote configuration: HTTPError(u’The supplied authentication is invalid’,)
Creating client
2017-07-17 10:52:32,443 - mycroft.messagebus.client.ws - INFO - Connected
Connected, speaking to Mycroft…‘hello world’
sent!
And it stucks on “Sent!” The first problem here is that even if I paired the device (2 times) I got the message:
2017-07-17 10:52:32,428 - mycroft.configuration - WARNING - Failed to fetch remote configuration: HTTPError(u'The supplied authentication is invalid',)
How can I get the device paired correctly?
Looking at the log, the last row is:
2017-07-17 10:52:32,656 - SpeechClient - INFO - Speak: Hello
Playing WAVE '/tmp/tts.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
That is telling me that I have another issue with the audio. When I boot the device I get:
2017-07-17 11:02:57,343 - mycroft.configuration - DEBUG - Configuration '/usr/local/lib/python2.7/site-packages/mycroft_core-0.8.1-py2.7.egg/mycroft/configuration/mycroft.conf' loaded
2017-07-17 11:02:57,351 - mycroft.configuration - DEBUG - Configuration '/etc/mycroft/mycroft.conf' loaded
2017-07-17 11:02:57,352 - mycroft.configuration - DEBUG - Configuration '/home/mycroft/.mycroft/mycroft.conf' loaded
2017-07-17 11:02:57,762 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
2017-07-17 11:02:58,643 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device/c6b5bfb4-1e24-40e8-a466-2dcf4c4bcd79/setting HTTP/1.1" 200 2906
Carnegie Mellon University, Copyright (c) 1999-2011, all rights reserved
version: mimic-2.0.0-release Dec 2014 (http://cmuflite.org)
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
2017-07-17 11:02:59,152 - mycroft.messagebus.client.ws - INFO - Connected
2017-07-17 11:03:00,118 - mycroft.client.speech.mic - DEBUG - Waiting for wake word...
It confirms I have an audio issue. I tried the steps as explained here, trying to set up the USB device as input and the default jack as output creating a .asoundrc file:
pcm.!default {
type asym
playback.pcm
{
type hw
card 0,0
}
capture.pcm
{
type hw
card 1,0
}
}
ctl.!default {
type asym
playback.pcm
{
type hw
card 0,0
}
capture.pcm
{
type hw
card 1,0
}
}
the devices are:
pi@picroft:~ $ lsusb
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
and
pi@picroft:~ $ cat /proc/asound/cards
0 [ALSA ]: bcm2835 - bcm2835 ALSA
bcm2835 ALSA
1 [Device ]: USB-Audio - USB PnP Sound Device
C-Media Electronics Inc. USB PnP Sound Device at usb-3f980000.usb-1.4, full spe
and
pi@picroft:~ $ aplay -L
default
Playback/recording through the PulseAudio sound server
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
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
if I delete the asoundrc file I have the same error. I also changed the lines
defaults.ctl.card 0
defaults.pcm.card 0.
to 1 in sudo nano /usr/share/alsa/alsa.conf
Any idea?
Thank you