Hello again!
It seems there are some permission problems with the basic setup of Mycroft on DietPi. Following a basic installation and changing the ownership of the skills folder (according to https://dietpi.com/forum/t/problems-with-installing-mycroft/4606/4 )
speaker-test works fine. The mycroft speaker test does not work.
root@DietPi:~# mycroft-start audiotest
Already up to date.
Initializing...
Changing ownership of /opt/mycroft to user: root with group: root
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/extern/dietpi_userdata/mycroft-core/.venv/lib/python3.7/site-packages/pyaudio.py", line 750, in open
stream = Stream(self, *args, **kwargs)
File "/mnt/extern/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)
root@DietPi:~# speaker-test
speaker-test 1.1.8
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 512 to 65536
Period size range from 512 to 65536
Using max buffer size 65536
Periods = 4
was set period_size = 16384
was set buffer_size = 65536
0 - Front Left
Time per period = 1.382565
0 - Front Left
Time per period = 2.729995
0 - Front Left
If I start mycroft-cli-client and give it a command (for example, “set timer”), it will ask me for how long the timer should be set, and then I can respond with my voice and it understands, so it’s not a problem here. It’s just for the wake word.
After some discussion on the mycroft forum, it seems the problem is that mycroft (the user that was installed during the installation of Mycroft) can’t access pulseaudio, or there is some problem with default devices.
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:
Any ideas how to solve this?