Mycroft Community Forum

Issue with pulseaudio

Hi there,

On my Ubuntu workstation, MyCroft only connects to Pulseaudio if it is started from the shell like so:
./mycroft-core/bin/mycroft-start all
./mycroft-core/bin/mycroft-stop all

If I instead start mycroft via systemd, MyCroft is unable to connect to pulseaudio and mycroft will not recognize my voice. The error found in /var/log/mycroft/audio.log is:

[0000000002a93380] vlcpulse audio output error: PulseAudio server connection failure: Connection refused

Log of the correct and faulty start up can be found here.

The systemd service file:

[Unit]
Description=Mycroft AI
After=pulseaudio.service  # Tried commenting this out, no effect

[Service]
User=nsemmler
WorkingDirectory=/home/user/
ExecStart=/home/user/mycroft-core/bin/mycroft-start all
ExecStop=/home/user/mycroft-core/bin/mycroft-stop all
Type=forking
Restart=no

[Install]
WantedBy=multi-user.target 

Versions: MyCroft v20.8.1, Ubuntu, 20.04 and Pulseaudio 13.99.1

Any idea how I can debug this?

If you run mycroft as systemwide service, you also need to configure and start pulseaudio as systemwide service.

Perhaps you can better run the mycroft systemd as user service and linger to make it start at boot

Some info, although a bit old and prone for an update;