root@DietPi:/# cat /etc/group
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:
fax:x:21:
voice:x:22:
cdrom:x:24:
floppy:x:25:
tape:x:26:
sudo:x:27:
audio:x:29:pulse,mycroft,root
dip:x:30:
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:root
sasl:x:45:
plugdev:x:46:
staff:x:50:
games:x:60:
users:x:100:
nogroup:x:65534:
systemd-journal:x:101:
systemd-timesync:x:102:
systemd-network:x:103:
systemd-resolve:x:104:
input:x:105:
kvm:x:106:
render:x:107:
crontab:x:108:
netdev:x:109:
messagebus:x:110:
bluetooth:x:112:
spi:x:999:
i2c:x:998:
gpio:x:997:
rdma:x:115:
systemd-coredump:x:996:
dietpi:x:1000:
mysql:x:111:
redis:x:113:www-data
pihole:x:995:www-data
pulse:x:114:root
pulse-access:x:116:root
mycroft:x:994:
Not sure if “root” is the best to run with. In this case pulse has to be run systemwide, isn’t it?
@j1nx might have some idea
you have a user mycroft, this has to be run from there.
su mycroft
Could it be that the user “mycroft” needs access to pulse?
I’m still not sure why only wake words are not working with this, though.
root@DietPi:~# mycroft-start audiotest -l
Already up to date.
Initializing...
Starting audiotest
Initializing...
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM rear
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM center_lfe
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM side
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
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_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM iec958:{AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2 CARD 0}
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM dmix
====================== Audio Devices ======================
Index Device Name
========================== Info ===========================
Input device: Default device @ Sample rate: 48000 Hz
Playback commandline: aplay WAV_FILE
===========================================================
== STARTING TO RECORD, MAKE SOME NOISE! ==
===========================================================
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/mnt/extern/dietpi_userdata/mycroft-core/mycroft/util/audio_test.py", line 132, in <module>
main()
File "/mnt/extern/dietpi_userdata/mycroft-core/mycroft/util/audio_test.py", line 119, in main
record(args.filename, args.duration)
File "/mnt/extern/dietpi_userdata/mycroft-core/mycroft/util/audio_test.py", line 66, in record
with mic as source:
File "/mnt/extern/dietpi_userdata/mycroft-core/mycroft/client/speech/mic.py", line 140, in __enter__
return self._start()
File "/mnt/extern/dietpi_userdata/mycroft-core/mycroft/client/speech/mic.py", line 151, in _start
input=True, # stream is an input stream
File "/mnt/dietpi_userdata/mycroft-core/.venv/lib/python3.7/site-packages/pyaudio.py", line 750, in open
stream = Stream(self, *args, **kwargs)
File "/mnt/dietpi_userdata/mycroft-core/.venv/lib/python3.7/site-packages/pyaudio.py", line 441, in __init__
self._stream = pa.open(**arguments)
OSError: [Errno -9996] Invalid input device (no default output device)
That’s for sure … see edit above
root@DietPi:~# su mycroft
This account is currently not available.
Is there a necessity that mycroft is sitting on a mount?
BTW i hope you have not exposed owncloud to the outside.
Happy to help, but could anyone formulate the exact question to me? Not sure, how/what/when…
I guess there are many questions. At least on my side 
First of which, under what user is mycroft running? This setup is a bit confusing. > `
ps aux | grep python
I just installed Mycroft via default Dietpi installation.
What’s wrong with my Owncloud setup?
root@DietPi:~# ps aux | grep python
root 387 0.2 0.5 428700 19868 ? Ssl 12:08 0:02 /usr/bin/python3 /usr/bin/fail2ban-server -xf start
mycroft 941 17.8 1.5 310084 62192 ? Sl 12:09 1:50 python3 -m mycroft.messagebus.service
mycroft 945 13.9 2.5 2441356 101296 ? Sl 12:09 1:26 python3 -m mycroft.skills
mycroft 949 1.5 1.7 1845656 68968 ? Sl 12:09 0:09 python3 -m mycroft.audio
mycroft 953 7.1 2.2 2169876 90572 ? Sl 12:09 0:44 python3 -m mycroft.client.speech
mycroft 957 16.9 1.5 511528 59864 ? Sl 12:09 1:44 python3 -m mycroft.client.enclosure
root 2431 0.0 0.0 4768 636 pts/0 S+ 12:19 0:00 grep python
add mycroft to root group
I just did, but I noticed that somewhere along the way, my microphone and speakers stopped working 
I got everything working again, but there’s still no detection of wake words, even after adding the user “mycroft” to the “root” group.
root@DietPi:/# cat /etc/asound.conf
pcm.!default {
type hw
card 0
device 0
}
ctl.!default {
type hw
card 0
}
root@DietPi:/# root@DietPi:/# arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: Snowball [Blue Snowball], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
root@DietPi:/# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
root@DietPi:/# mycroft-start audiotest
Already up to date.
Initializing...
Starting audiotest
========================== Info ===========================
Input device: Default device @ Sample rate: 48000 Hz
Playback commandline: aplay WAV_FILE
===========================================================
== STARTING TO RECORD, MAKE SOME NOISE! ==
===========================================================
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/mnt/extern/dietpi_userdata/mycroft-core/mycroft/util/audio_test.py", line 132, in <module>
main()
File "/mnt/extern/dietpi_userdata/mycroft-core/mycroft/util/audio_test.py", line 119, in main
record(args.filename, args.duration)
File "/mnt/extern/dietpi_userdata/mycroft-core/mycroft/util/audio_test.py", line 66, in record
with mic as source:
File "/mnt/extern/dietpi_userdata/mycroft-core/mycroft/client/speech/mic.py", line 140, in __enter__
return self._start()
File "/mnt/extern/dietpi_userdata/mycroft-core/mycroft/client/speech/mic.py", line 151, in _start
input=True, # stream is an input stream
File "/mnt/dietpi_userdata/mycroft-core/.venv/lib/python3.7/site-packages/pyaudio.py", line 750, in open
stream = Stream(self, *args, **kwargs)
File "/mnt/dietpi_userdata/mycroft-core/.venv/lib/python3.7/site-packages/pyaudio.py", line 441, in __init__
self._stream = pa.open(**arguments)
OSError: [Errno -9996] Invalid input device (no default output device)
The microphone works if I run a command via mycroft-cli-client and let it ask me something (“set timer for how long?”), it’s ‘just’ the wakeword thats making problems.
Don’t run anything for mycroft as root, as that tends to screw more things up than it helps. The error indicates it didn’t have permissions to the input device, so pulseaudio may not be getting started correctly (ie, as mycroft).
So, in theory, the next step would be killing the pulseaudio process, and restarting it as the mycroft user?
Edit: After a reboot:
root@DietPi:~# pactl info
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
root@DietPi:~# pulseaudio --check -v
I: [pulseaudio] main.c: Daemon not running
root@DietPi:~# cat /etc/group
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:
fax:x:21:
voice:x:22:
cdrom:x:24:
floppy:x:25:
tape:x:26:
sudo:x:27:
audio:x:29:pulse,root,mycroft
dip:x:30:
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:root
sasl:x:45:
plugdev:x:46:
staff:x:50:
games:x:60:
users:x:100:
nogroup:x:65534:
systemd-journal:x:101:
systemd-timesync:x:102:
systemd-network:x:103:
systemd-resolve:x:104:
input:x:105:
kvm:x:106:
render:x:107:
crontab:x:108:
netdev:x:109:
messagebus:x:110:
bluetooth:x:112:
spi:x:999:
i2c:x:998:
gpio:x:997:
rdma:x:115:
systemd-coredump:x:996:
dietpi:x:1000:
mysql:x:111:
redis:x:113:www-data
pihole:x:995:www-data
pulse:x:114:root
pulse-access:x:116:root
mycroft:x:994:
sudo systemctl status
Pulse audio runs on a user basis non daemonized by default
root@DietPi:~# sudo systemctl status
● DietPi
State: running
Jobs: 0 queued
Failed: 0 units
Since: Thu 1970-01-01 01:00:00 BST; 50 years 10 months ago
CGroup: /
├─init.scope
│ └─1 /sbin/init
└─system.slice
├─fail2ban.service
│ └─387 /usr/bin/python3 /usr/bin/fail2ban-server -xf start
├─systemd-udevd.service
│ └─140 /lib/systemd/systemd-udevd
├─rng-tools.service
│ └─241 /usr/sbin/rngd -r /dev/hwrng
├─cron.service
│ └─746 /usr/sbin/cron -f
├─mariadb.service
│ └─598 /usr/sbin/mysqld
├─mycroft.service
│ ├─729 python3 -m mycroft.messagebus.service
│ ├─732 python3 -m mycroft.skills
│ ├─735 python3 -m mycroft.audio
│ ├─738 python3 -m mycroft.client.speech
│ ├─741 python3 -m mycroft.client.enclosure
│ ├─869 /mnt/dietpi_userdata/mycroft-data/.mycroft/precise/precise-engine/precise-engine /mnt/dietpi_userdata/mycroft-data/.mycroft/precise/hey-mycroft.pb 2048
│ └─872 /mnt/dietpi_userdata/mycroft-data/.mycroft/precise/precise-engine/precise-engine /mnt/dietpi_userdata/mycroft-data/.mycroft/precise/hey-mycroft.pb 2048
├─pihole-FTL.service
│ └─417 /usr/bin/pihole-FTL
├─lighttpd.service
│ └─672 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
├─systemd-journald.service
│ └─109 /lib/systemd/systemd-journald
├─php7.3-fpm.service
│ ├─ 642 php-fpm: master process (/etc/php/7.3/fpm/php-fpm.conf)
│ ├─3722 php-fpm: pool www
│ ├─3725 php-fpm: pool www
│ ├─3727 php-fpm: pool www
│ ├─3731 php-fpm: pool www
│ ├─3733 php-fpm: pool www
│ ├─3735 php-fpm: pool www
│ ├─3739 php-fpm: pool www
│ └─3740 php-fpm: pool www
├─vmtouch.service
│ └─231 /usr/bin/vmtouch -l /boot/dietpi /boot/dietpi.txt
├─mnt-extern.mount
│ └─315 /sbin/mount.ntfs /dev/sda1 /mnt/extern -o rw,noatime,lazytime,permissions,big_writes
├─alsa-state.service
│ └─236 /usr/sbin/alsactl -E HOME=/run/alsa -s -n 19 -c rdaemon
├─redis-server.service
│ └─528 /usr/bin/redis-server 127.0.0.1:6379
├─system-getty.slice
│ └─getty@tty1.service
│ └─503 /sbin/agetty -o -p -- \u --noclear tty1 linux
├─ifup@eth0.service
│ └─359 /sbin/dhclient -4 -v -i -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df /var/lib/dhcp/dhclient6.eth0.leases eth0
└─dropbear.service
├─ 507 /usr/sbin/dropbear -p 22 -W 65536
├─ 703 /usr/sbin/dropbear -p 22 -W 65536
├─ 764 -bash
├─3748 sudo systemctl status
├─3749 systemctl status
└─3750 pager
i guess you have to run pulseaudio systemwide (as said above) - if you stick with root.
Can you tell me how to do that?
Personally, no.
Hey guys, DietPi developer here. Dealing with a separate issue (permissions issue on skills dir our side), I ran some tests of our Mycroft AI implementation and indeed some things seem to have changed since I implemented it >1 year ago, and I’m currently trying to get everything working OOTB.
@Green
First of all, did you install Mycroft via dietpi-software or manually using e.g. the dev_setup.sh. Since you mention the mycroft system user (that cannot be accessed via login shell as you found, trying su, use sudo instead, for interactive shell sudo -s which is logged much better and is beneficial in other ways security-wise), it seems you installed it through dietpi-software.
That also matches the mycroft.service systemd unit.
The actual bug our side is missing skills dir permissions, as the official installer chowns a symlink in our case but by default chown -R does not traverse symlink targets. So the solution for that is: chown -R /mnt/dietpi_userdata/mycroft-data
Fixed for next DietPi release.
First audio-related thing is, we did intentionally not install PulseAudio in the past, since all other software implementations and our audio config script use ALSA and PA would mess up things here and is still (or will always be) known to have issues with many media software. So for now I aim to leave it like that and setup things to work with ALSA only OOTB. A few months after we created our implementation, PulseAudio became installed as dependency by dev_setup.sh installer (which we use), so to no mess up things, this would need to be removed first. I hope for either a revert or an option to not force PulseAudio usage, as long as we get things running with plain ALSA, for now we’ll use a sed to remove it.
@Green
If you are in mood to follow my tests, you could hence do:
apt -y purge pulseaudio pulseaudio-utils
apt -y autopurge
Next is, we use the ALSA hw plugin, which does no audio conversions. That is fine with mpg123 and ogg123 but using aplay for wav files may fail, if they’re not in a format that is supported by the audio device. Software conversions have some downsides as well, but to be flexible with different Mycroft AI sources and voices, including microphone capture, it makes sense to allow them via following ALSA configuration (invoking the “plug” plugin which does automated conversion, if required):
cat << '_EOF_' > /etc/asound.conf
pcm.!default {
type plug
slave.pcm {
type hw
card 0
device 0
}
}
ctl.!default {
type hw
card 0
}
_EOF_
You might need to use card 1 here for 3.5mm jack output after recent RPi firmware change, if an audio-capable HDMI monitor is attached.
I added an option to dietpi-config to toggle automated format conversion with the next version.
To overcome issues with incompatible sample rates of recordings, we changed the default in our global mycroft.conf, however that can be skipped then. This was the step that made Mycroft microphone capture even possible on a test system. Before, in mycroft-cli-client the mic level bar was frozen shortly after start, while arecord tests worked fine. Not sure what the reason might be, but this is a different topic. To revert listener sample rate to Mycroft defaults:
curl -sSfL https://raw.githubusercontent.com/MichaIng/DietPi/dev/.conf/dps_176/mycroft.conf -o /etc/mycroft/mycroft.conf
This file btw as well sets the data directory (in to a location that can be easily setup as external drive, yes, to reduce SD card writes where possible while keeping the core OS there) and overrides the default command to play wav files (paplay (PulseAudio)) with aplay (ALSA).
After changes, a service restart makes sense: (sudo) systemctl restart mycroft
Then in CLI mycroft-cli-client I see mic level dancing and most input and output works fine.
Switching setting on https://home.mycroft.ai/, while American and Google voices + Christopher, Ezra and Jarvis wake words work fine (okay I needed to learn how to pronounce “Jarvis” correctly
), the two defaults “Hey Mycroft” and “British Male” do not.
- In case of the wake word, I don’t see related error messages. Probably I’m pronouncing it wrong, but even the Google translator TTS is not able to wake it: https://translate.google.de/?text=Hey%20Mycroft!
- In case of the british voice, I indeed get a Python error trace:
2020-11-16 20:18:40.951 | DEBUG | 5511 | urllib3.connectionpool | Starting new HTTPS connection (1): api.mycroft.ai:443
2020-11-16 20:18:41.452 | DEBUG | 5511 | urllib3.connectionpool | https://api.mycroft.ai:443 "GET /v1/device/92204eb5-cbbc-4f2d-becc-926e654e11e4/subscription HTTP/1.1" 200 17
2020-11-16 20:18:41.463 | ERROR | 5511 | mycroft.tts.tts:create:529 | The TTS could not be loaded.
Traceback (most recent call last):
File "/mnt/dietpi_userdata/mycroft-core/mycroft/tts/mimic_tts.py", line 187, in validate_connection
subprocess.call([BIN, '--version'])
File "/usr/lib/python3.7/subprocess.py", line 323, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1436, in _execute_child
executable = os.fsencode(executable)
File "/usr/lib/python3.7/os.py", line 809, in fsencode
filename = fspath(filename) # Does type-checking of `filename`.
TypeError: expected str, bytes or os.PathLike object, not NoneType
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/mnt/dietpi_userdata/mycroft-core/mycroft/tts/tts.py", line 519, in create
tts.validator.validate()
File "/mnt/dietpi_userdata/mycroft-core/mycroft/tts/tts.py", line 435, in validate
self.validate_connection()
File "/mnt/dietpi_userdata/mycroft-core/mycroft/tts/mimic_tts.py", line 189, in validate_connection
LOG.info("Failed to find mimic at: " + BIN)
TypeError: can only concatenate str (not "NoneType") to str
2020-11-16 20:18:41.465 | ERROR | 5511 | mycroft.audio.speech:handle_speak:99 | Error in mute_and_speak
Traceback (most recent call last):
File "/mnt/dietpi_userdata/mycroft-core/mycroft/tts/mimic_tts.py", line 187, in validate_connection
subprocess.call([BIN, '--version'])
File "/usr/lib/python3.7/subprocess.py", line 323, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1436, in _execute_child
executable = os.fsencode(executable)
File "/usr/lib/python3.7/os.py", line 809, in fsencode
filename = fspath(filename) # Does type-checking of `filename`.
TypeError: expected str, bytes or os.PathLike object, not NoneType
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/mnt/dietpi_userdata/mycroft-core/mycroft/audio/speech.py", line 95, in handle_speak
mute_and_speak(chunk, ident, listen)
File "/mnt/dietpi_userdata/mycroft-core/mycroft/audio/speech.py", line 123, in mute_and_speak
tts = TTSFactory.create()
File "/mnt/dietpi_userdata/mycroft-core/mycroft/tts/tts.py", line 519, in create
tts.validator.validate()
File "/mnt/dietpi_userdata/mycroft-core/mycroft/tts/tts.py", line 435, in validate
self.validate_connection()
File "/mnt/dietpi_userdata/mycroft-core/mycroft/tts/mimic_tts.py", line 189, in validate_connection
LOG.info("Failed to find mimic at: " + BIN)
TypeError: can only concatenate str (not "NoneType") to str