Mycroft Community Forum

Connection refused?

Hello Mycrofters,

I was battling with Mycroft starting as a systemd service and thought that I had resolved it. If I start Mycroft manually, it answers my questions. Mycroft now starts at boot time, however it does not answer. When I try to wake it, I see this in voice.log:

2021-06-26 14:31:41.904 | INFO     | 27558 | __main__:handle_wakeword:71 | Wakeword Detected: hey mycroft
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
2021-06-26 14:31:41.977 | INFO     | 27558 | __main__:handle_record_begin:41 | Begin Recording...
2021-06-26 14:31:46.081 | INFO     | 27558 | __main__:handle_record_end:49 | End Recording...
2021-06-26 14:31:48.157 | ERROR    | 27558 | mycroft.client.speech.listener:transcribe:239 | list index out of range
2021-06-26 14:31:48.159 | ERROR    | 27558 | mycroft.client.speech.listener:transcribe:240 | Speech Recognition could not understand audio

Why would I get “Connection refused” when Mycroft is started by systemctl?

The distro is Raspberry Pi OS, aka Raspbian.

Thanks.

-Mike M

pa == pulse audio, so making sure that’s running correctly before mycroft starts should be included in your systemd scripts

Thanks baconator for the quick reply … meant to answer last week.

But, I got it solved - mycroft is running at boot time and answering questions!!!

The solution was to remove the --system from this line of the pulseaudio systemd config file:

ExecStart=/usr/bin/pulseaudio --daemonize=no --realtime --log-target=journal

I guess I had added it to try as a fix, and then forgot to delete it.

Thanks to all who helped on this issue.

-Mike M
1 Like