PiCroft issue with pairing

Ah, then you should probably edit /etc/mycroft/mycroft.conf like this.
or copy this in .mycroft/mycroft.conf

(just get rid of the -Dhw:0,0 in aplay!)

{
“play_wav_cmdline”: “aplay %1”,
“enclosure”: {
“platform”: “picroft”,
“update”: true,
“test”: false
},
“play_wav_cmdline”: “aplay %1”,
“play_mp3_cmdline”: “mpg123 %1”,
“tts”: {
“module”: “mimic”,
“mimic”: {
“voice”: “ap”,
“path”: “/usr/local/bin/mimic”
}
}
}

2 Likes

ok tjoen!

with the correct /etc/mycroft/mycroft.conf

the errors at startup are gone!

dditional commands you can use from the command line:
mycroft-cli-client - command line client, useful for debugging
msm - Mycroft Skills Manager, install new Skills from Github
say_to_mycroft - one-shot commands from the command line
speak - say something to the user
test_microphone - record and playback to test your microphone


16:52:40.620 - mycroft.configuration.config:load_local:110 - DEBUG - Configuration /usr/local/lib/python2.7/site-packages/mycroft_core-0.9.10-py2.7.egg/mycroft/configuration/mycroft.conf loaded
16:52:40.634 - mycroft.configuration.config:load_local:110 - DEBUG - Configuration /usr/local/lib/python2.7/site-packages/mycroft_core-0.9.10-py2.7.egg/mycroft/configuration/mycroft.conf loaded
16:52:40.639 - mycroft.configuration.config:load_local:110 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded
16:52:40.655 - mycroft.configuration.config:load_local:110 - DEBUG - Configuration /home/mycroft/.mycroft/mycroft.conf loaded
16:52:40.674 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
16:52:41.548 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 “GET /v1/device/ef5da3d9-297f-46ec-bf3f-0359438b47d5/setting HTTP/1.1” 200 4
16:52:41.562 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai

$ test_microphone give the same error

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
ALSA lib pcm_dmix.c:961:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dsnoop.c:557:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream

BUT NOW I can hear my voice!

and if i use

arecord -c2 -r 48000 -f S32_LE -t wav -V stereo -v file_stereo.wav

i can see a strong signal on vumeters

take the time you need, I’ll wait patiently

I’m not sure of all the changes I’ve made, so maybe it’s better to start from something working and stable

thank you
Ale

That did it! Working great now for a full day! Only trouble I seem to be having at the moment is getting the output volume to change. Even when Mycroft tells me that volume is at zero, it’s still blasting away out the AIY speaker. Any attempts to set volume with amixer at the command line also seem fruitless. Any tips for checking if the volume skill is functioning properly?

1 Like

Still testing the new wifi setup I’m afraid. Hope to get it online before christmas…

Tjoen

Hmmm, I am now able to set the volume with command “raise volume” and “lower volume”.
I did have to change the pulseaudio config for that I think…?

This is my setup:

/home/pi/auto_run.sh:

sudo amixer cset numid=3 "0"   # audio out the analog speaker/headphone jack
amixer set Master 50% # set volume to a reasonable level

/etc/asound.conf:

options snd_rpi_googlevoicehat_soundcard index=0

pcm.softvol {
    type softvol
    slave.pcm dmix
    control {
        name Master
        card 0
    }
}

pcm.micboost {
    type route
    slave.pcm dsnoop
    ttable {
        0.0 10.0
        1.1 10.0
    }
}

pcm.!default {
    type asym
    playback.pcm "plug:softvol"
    capture.pcm "plug:micboost"
}

ctl.!default {
    type hw
    card 0
}

/etc/pulse/default.pa:
#uncomment and change module-alsa-sink and module-alsa-source:
load-module module-alsa-sink device=hw:0
load-module module-alsa-source device=hw:0,0

here it is

1 Like

Are you all using the AIY image, or the Picroft image? I’ve been trying to follow the info here, using the Pycroft image, but without luck so far. The configure-driver.sh script isn’t available unless you git checkout voicekit on the AIY repo (as mentioned here: https://github.com/google/aiyprojects-raspbian/issues/378#issuecomment-390433370 ).

I’ve sorted it out. I’m now able to make a new disk image compatible with the Google AIY Kit, from the stock raspbian_Picroft_2018-03-14 image, based on info I gathered from this thread. I am not, however, installing the whole aiyprojects-raspbian toolchain, since that seems to add a lot of setup time and unneeded packages. My setup steps are in a gist here: https://gist.github.com/clebio/5c0d5af3fbd800e9ecf500ccbed096ac

1 Like

Nice work, @calebio!