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 chown
s 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
First of all, did you install Mycroft via
dietpi-software
or manually using e.g. thedev_setup.sh
.
dietpi-software.
root@DietPi:~# root@DietPi:~# curl -sSfL https://raw.githubusercontent.com/MichaIng/DietPi/mycroft/.conf/dps_176/mycroftycroft/mycroft.conf
curl: (22) The requested URL returned error: 404 Not Found
Changing the asound.conf results in no microphone nor 3.5mm jack, so I reverted it back. No HDMI is attached.
My initial setup was american voice + “Hey Mycroft”. Changing those to Ezra and Jarvis does not yield any results. I don’t get any error messages, it’s like nothing gets picked up (except if it awaits an answer).
Strange, what is the current content of it: cat /etc/asound.conf
Do you see the mic level bar in the CLI moving/reacting to your voice?
Strange, what is the current content of it:
cat /etc/asound.conf
I’ve let it on default:
root@DietPi:~# cat /etc/asound.conf
pcm.!default {
type hw
card 0
device 0
}
ctl.!default {
type hw
card 0
}
Maybe I’ve made an error changing it, I can try again.
Edit: Working now, sorry.
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
^CTime per period = 0.600058
root@DietPi:~# cat /etc/asound.conf
pcm.!default {
type plug
slave.pcm {
type hw
card 0
}
}
ctl.!default {
type hw
card 0
}
Do you see the mic level bar in the CLI moving/reacting to your voice?
Yes, that works as expected.
Edit 2:
I just noticed something else:
Some skills aren’t able to create voice output.
If I enter “set timer”, I’ll get asked (by voice and in the CLI log) “How long of a timer?”
If I enter “what’s in the news?”, he speaks, too.
If I enter “What is $anything?”, there’s output on the CLI, but not via voice.
23:19:48.631 | INFO | 755 | QuestionsAnswersSkill | Searching for what is mycroft
Removing event fallback-query.mycroftai:QuestionQueryTimeout
Removing event fallback-query.mycroftai:QuestionQueryTimeout
['Mycroft Holmes A fictional character appearing in stories written by Sir Arthur Conan Doyle']
23:19:49.095 | INFO | 755 | QuestionsAnswersSkill | Answer from mycroft-fallback-duck-duck-go.mycroftai
~~~~earing in stories written by Sir Arthur Conan Doyle. The elder brother (by seven years) of detective Sherlock Holmes, he is a government official and a founding member of the Diogenes Club. 23:19:49.998 | INFO | 755 | QuestionsAnswersSkill | Answer from fallback-wolfram-alpha.mycroftai
Removing event fallback-query.mycroftai:QuestionQueryTimeout
Removing event fallback-query.mycroftai:QuestionQueryTimeout
23:19:51.025 | INFO | 755 | QuestionsAnswersSkill | Timeout occured check responses
23:19:51.038 | INFO | 755 | QuestionsAnswersSkill | Handling with: mycroft-fallback-duck-duck-go.mycroftai
Same happens if I enter “What time is it?”, but there’s nothing in the log output for this. I’m not sure if this is related, but interesting nontheless.
Edit 3: Ignore Edit 2, it works now, even without rebooting. Strange.
Ah sorry, I merged the branch to dev and removed it , so it’s:
curl -sSfL https://raw.githubusercontent.com/MichaIng/DietPi/dev/.conf/dps_176/mycroft.conf -o /etc/mycroft/mycroft.conf
That somehow matches my experience when using the old /etc/asound.conf
without conversions, as then, if the sound card does not support the given wav format, if fails (silently in my case) and otherwise it succeeds. Also some audio sources are mp3 or ogg files, which always succeed, so only wav is affected. But it can be something different.
The British Male voice works fine in your case? I tried on different machines and different Debian versions and if fails everywhere with the same error message (/var/log/mycroft/audio.log
) that was reported here already: Upgraded ubuntu from 18.04 to 20.04, no more TTS - #9 by dan
Getting your mycroft.conf worked now, but it’s still not detecting the wake word.
The British Male voice works fine in your case?
Well, besides the wake word, yeah. I attached my audio.log (the command to start/stop the timer were written in the CLI, the “one minute” was voice-detected, as always). The other voices seem to respond much, much slower, but I’m not sure if it was random or if it is a problem with my setup.
Edit: It’s been a while since I tested it, I could try again with other voices.
root@DietPi:~# cat /var/log/mycroft/audio.log
2020-11-17 21:06:00.670 | INFO | 761 | mycroft.messagebus.load_config:load_message_bus_config:33 | Loading message bus configs
2020-11-17 21:06:00.808 | INFO | 761 | mycroft.tts.mimic2_tts:__init__:176 | Getting Pre-loaded cache
2020-11-17 21:06:02.535 | INFO | 761 | mycroft.tts.mimic2_tts:__init__:178 | Successfully downloaded Pre-loaded cache
2020-11-17 21:06:02.544 | INFO | 761 | __main__:main:50 | Starting Audio Services
2020-11-17 21:06:02.893 | INFO | 761 | mycroft.messagebus.client.client:on_open:114 | Connected
2020-11-17 21:06:03.196 | INFO | 761 | mycroft.audio.audioservice:get_services:61 | Loading services from /mnt/extern/dietpi_userdata/mycroft-core/mycroft/audio/services/
2020-11-17 21:06:03.874 | INFO | 761 | mycroft.audio.audioservice:load_services:105 | Loading chromecast
2020-11-17 21:06:10.531 | INFO | 761 | mycroft.audio.audioservice:load_services:105 | Loading mopidy
2020-11-17 21:06:10.614 | INFO | 761 | mycroft.audio.audioservice:load_services:105 | Loading mplayer
2020-11-17 21:06:10.979 | ERROR | 761 | audioservice_mplayer:<module>:20 | install py_mplayer with pip install git+https://github.com/JarbasAl/py_mplayer
2020-11-17 21:06:11.088 | ERROR | 761 | mycroft.audio.audioservice:load_services:114 | Failed to import module mplayer
ModuleNotFoundError("No module named 'py_mplayer'")
2020-11-17 21:06:11.259 | INFO | 761 | mycroft.audio.audioservice:load_services:105 | Loading simple
2020-11-17 21:06:11.348 | INFO | 761 | mycroft.audio.audioservice:load_services:105 | Loading vlc
2020-11-17 21:06:11.729 | ERROR | 761 | mycroft.audio.audioservice:load_services:129 | Failed to load service. NameError("no function 'libvlc_new'")
2020-11-17 21:06:11.804 | INFO | 761 | mycroft.audio.audioservice:load_services_callback:177 | Finding default backend...
2020-11-17 21:06:11.822 | INFO | 761 | mycroft.audio.audioservice:load_services_callback:181 | Found local
2020-11-17 21:06:11.837 | INFO | 761 | __main__:on_ready:30 | Audio service is ready.
2020-11-17 21:07:18.332 | INFO | 761 | mycroft.audio.speech:mute_and_speak:127 | Speak: How long of a timer?
Playing WAVE '/tmp/mycroft/cache/tts/Mimic2/1db9ce8c25e4c98f15de609813128fb8.wav' : Signed 16 bit Little Endian, Rate 22000 Hz, Mono
2020-11-17 21:07:24.348 | INFO | 761 | mycroft.audio.speech:mute_and_speak:127 | Speak: I'm starting a timer for one minute
Playing WAVE '/tmp/mycroft/cache/tts/Mimic2/d109e7f340335f801d9e68b658caaf40.wav' : Signed 16 bit Little Endian, Rate 22000 Hz, Mono
2020-11-17 21:07:35.234 | INFO | 761 | mycroft.audio.speech:mute_and_speak:127 | Speak: Timer cancelled
Playing WAVE '/tmp/mycroft/cache/tts/Mimic2/62826a378ffa17d4f739d54869ef7db7.wav' : Signed 16 bit Little Endian, Rate 22000 Hz, Mono
Okay, I was just now aware of the fact that the British Voice is the local Mimic voice, hence Mimic needs to be installed first . So that is working fine now here.
The mplayer
+ libvlc_new
errors occurs here as well. Could be installed but seems to be not required as everything works fine here now without it. Also it is not mentioned somewhere in docs.
Probably debug logs show if/how the wake word is recognised. For this add:
"log_level": "DEBUG",
to the top of your /mnt/dietpi_userdata/mycroft-data/.mycroft/mycroft.conf
. (to the top as of the trailing comma ,
that must be present if a next entry exists, else must not be present )
Although random noise/speaking does not trigger any log, but worth to give it a try.
root@DietPi:~# cat /mnt/dietpi_userdata/mycroft-data/.mycroft/mycroft.conf
{
"log_level": "DEBUG",
"max_allowed_core_version": 20.8
}
root@DietPi:~#
Looks like nothing gets detected, at all. “set timer” as comparsion.
21:31:42.038 | DEBUG | 749 | mycroft.skills.intent_service:handle_utterance:346 | Utterances: ['set timer']
21:31:42.065 | DEBUG | 749 | mycroft.skills.intent_service:handle_utterance:366 | Padatious intent: {'name': 'mycroft-timer.mycroftai:start.timer.intent', 'sent': 'set timer', 'matches': {}, 'conf': 0.46463534808891255}
~~~~', 'data': [('set', 'mycroft_timer_mycroftaiStart'), ('set', 'mycroft_alarm_mycroftaiSet'), ('set', 'mycroft_volume_mycroftaiSet'), ('set', 'mycroft_configuration_mycroftaiSet')], 'confidence': 1.0}], 'end_token': 0, 'from_context': False}], 'utterance': 'set timer'} 21:31:44.597 | DEBUG | 755 | mycroft.client.speech.mic:trigger_listen:527 | Listen triggered from external source.
21:31:44.657 | DEBUG | 755 | mycroft.client.speech.mic:listen:723 | Recording...
Playing WAVE '/mnt/extern/dietpi_userdata/mycroft-core/mycroft/res/snd/start_listening.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
21:31:45.193 | DEBUG | 749 | VolumeSkill | MUTING!
21:31:45.194 | DEBUG | 749 | VolumeSkill | Finding Alsa Mixer for control...
21:31:45.195 | DEBUG | 749 | VolumeSkill | Volume before mute: 96
21:31:45.172 | INFO | 755 | __main__:handle_record_begin:37 | Begin Recording...
21:31:46.527 | INFO | 755 | __main__:handle_record_end:45 | End Recording...
21:31:45.195 | DEBUG | 749 | VolumeSkill | Volume before mute: 96
21:31:45.195 | DEBUG | 749 | VolumeSkill | 96
21:31:45.195 | DEBUG | 749 | VolumeSkill | 0
21:31:46.551 | DEBUG | 749 | VolumeSkill | Finding Alsa Mixer for control...
21:31:46.553 | DEBUG | 749 | VolumeSkill | 96
21:31:46.594 | DEBUG | 755 | urllib3.connectionpool | Starting new HTTPS connection (1): api.mycroft.ai:443
21:31:47.483 | DEBUG | 755 | mycroft.client.speech.mic:listen:710 | Waiting for wake word...
21:31:47.635 | DEBUG | 755 | urllib3.connectionpool | https://api.mycroft.ai:443 "POST /v1/stt?lang=en-US&limit=1 HTTP/1.1" 200 14
21:31:47.651 | DEBUG | 755 | mycroft.client.speech.listener:transcribe:224 | STT: 1 minutes
21:31:47.751 | INFO | 755 | mycroft.session:get:74 | New Session Start: 8138fdde-a7c9-46cc-9b6c-b2eaaf04c44f
21:31:47.765 | INFO | 755 | __main__:handle_utterance:72 | Utterance: ['1 minutes']
21:31:48.067 | DEBUG | 749 | mycroft.skills.intent_service:handle_utterance:346 | Utterances: ['1 minutes']
21:31:48.094 | DEBUG | 749 | TimerSkill | Utterance being searched: set timer
21:31:48.100 | DEBUG | 749 | TimerSkill | Regex pattern: \bfor.* (called|for|named) (?P<Name>.*)
21:31:48.104 | DEBUG | 749 | TimerSkill | Regex pattern: \b(called|for|named) (?P<Name>.*) for
21:31:48.106 | DEBUG | 749 | TimerSkill | Regex pattern: \b(called|for|named) (?P<Name>.*)
21:31:48.107 | DEBUG | 749 | TimerSkill | Regex pattern: \b^.*(a|of|the) (?P<Name>.*) timer
21:31:48.110 | DEBUG | 749 | TimerSkill | Regex pattern: \b^.* (?P<Name>.*)(?<!a)(?<!an)(?<!another)(?<!any)(?<!my)(?<!one more)(?<!our)(?<!the) timer$
21:31:48.112 | DEBUG | 749 | TimerSkill | -------------TIMER-CREATED-------------
21:31:48.113 | DEBUG | 749 | TimerSkill | creating timer: name: None
21:31:48.113 | DEBUG | 749 | TimerSkill | creating timer: index: 1
21:31:48.113 | DEBUG | 749 | TimerSkill | creating timer: ordinal: 1
21:31:48.113 | DEBUG | 749 | TimerSkill | creating timer: duration: 60.0
21:31:48.114 | DEBUG | 749 | TimerSkill | creating timer: expires: 2020-11-19 21:32:48.112725
21:31:48.114 | DEBUG | 749 | TimerSkill | creating timer: announced: False
21:31:48.113 | DEBUG | 749 | TimerSkill | creating timer: ordinal: 1
21:31:48.113 | DEBUG | 749 | TimerSkill | creating timer: duration: 60.0
21:31:48.114 | DEBUG | 749 | TimerSkill | creating timer: expires: 2020-11-19 21:32:48.112725
21:31:48.114 | DEBUG | 749 | TimerSkill | creating timer: announced: False
21:31:48.114 | DEBUG | 749 | TimerSkill | ---------------------------------------
21:31:48.274 | DEBUG | 749 | mycroft.skills.intent_service:handle_utterance:371 | Handled in converse()
21:31:50.948 | DEBUG | 749 | mycroft.skills.mycroft_skill.mycroft_skill:enable_intent:1015 | Enabling intent handle_mute_timer
Removing event mycroft-timer.mycroftai:ShowTimer
21:31:50.980 | DEBUG | 749 | mycroft.skills.mycroft_skill.event_container:add:146 | Added event: mycroft-timer.mycroftai:ShowTimer
21:32:19.102 | DEBUG | 749 | mycroft.skills.intent_service:handle_utterance:346 | Utterances: ['stop timer']
I tried waking it between the last line and the line before.
In my case it is still and only the “Hey Mycroft” wake word that does not work, same symptoms, no logs. So I first assured that I pronounce it correctly by using another wake word, wake it and say “Hey Mycroft” and watched console logs that indeed STT translated it correctly.
So I was watching the logs to check if/what different STT engines are used for the different wake words:
- Christopher: No model in “precise”, falls back to “pocketspinx”.
- Hey Ezra: No model in “precise”, falls back to “pocketspinx”.
- Hey Jarvis: No model in “precise”, falls back to “pocketspinx”.
- Hey Mycroft: Loads “hey mycroft” via “precise” AND “wake up” via pocketspinx, so there are two STT engines loaded concurrently? Both “wake up” and “hey mycroft” do not work in my case, and I tried it a loooot of times with TTS etc, so it’s not about my pronunciation.
So it seems like precise does not work in my case, and probably it interferes and conflicts with/breaks the otherwise well working pocketspinx?
/var/log/mycroft/voice.log
(and the CLI) btw should show all relevant debug info, however, no errors in our cases. Probably someone knows how the STT engines can be debugged from a point on where the microphone definitely works, the mic level in Mycroft CLI is reacting and at least Mycroft processes to not report any error.