I use picroft and ran into several issues with the skills functionality. I’ll just talk about the ‘Audio Recorder’ skill for now. Whenever I wake up Mycroft and tell him to ‘start recording’ he agrees to it and it seems to work on the surface. But in reality Mycroft doesn’t record anything and if you look into the mycroft-core interface using ssh it gives following message:
arecord: main:788: audio open error: No such file or directory
Checking [‘put the garbage out’, ‘20182312-160000–0600’]
‘Put the garbage out’ is actually linked to the other ‘Set Reminders’ skill that I tried to test and which also didn’t work. For some reason it saved the text of the reminder and now it appears when I try to test other skills.
I am very new to Python and UNIX in general, so I am not sure how much more I can say about this. Hope you can help out.
I can’t find anything in the skill that would link to the reminders skill.
What version are you running?
Do you see the word ‘Recording’ anywhere it should log that if its starting the record.
This is what appeared after I reinstalled ‘Audio Record’ and ‘Set Reminder’ skills. Not sure what you mean which version. I have a Pi 3 B+, and I’ve recently run some updates on Mycroft.
~~~~05.721 - __main__:handle_wakeword:56 - INFO - Wakeword Detected: hey mycroft
13:37:05.724 - AlarmSkill - INFO - on ended...
~~~~_:handle_utterance:61 - INFO - Utterance: ['start recording for 10 seconds']
~~~~nce_number_en: {}ValueError("invalid literal for int() with base 10: '.0'",)
~~~~nce_number_en: {}ValueError("invalid literal for int() with base 10: '.0'",)
~~~~nce_number_en: {}ValueError("invalid literal for int() with base 10: '.0'",)
arecord: main:788: audio open error: No such file or directory
Hi there @BobTheBuilder, thanks for giving Picroft a try, and also for taking the time to report the issues that were encountered, we really appreciate it.
We’d really like to help and dig into why this happened for you. In order to do this we will need to have a look at your Picroft’s logs. You can do this by invoking the Support Skill - Hey Mycroft, create a support ticket, or if you’re comfortable digging around a bit, we have the logs documented here.
Thanks for replying. So I did a clean re-install and started from scratch. But the ‘Audio Record’ skill problem still persists. I created a support ticket here https://termbin.com/duxl . Not sure if that helps, but further assistance is greatly appreciated. I run the latest Mycroft version 18.8.9. Below is also the info from the CLI.
20:03:25.575 - __main__:handle_wakeword:56 - INFO - Wakeword Detected: hey mycroft
20:03:27.809 - __main__:handle_utterance:61 - INFO - Utterance: ['start recording for 10 seconds']
~~~~ - ERROR - Exception in pronounce_number_en: {}ValueError("invalid literal for int() with base 10: '.0'",)
~~~~ - ERROR - Exception in pronounce_number_en: {}ValueError("invalid literal for int() with base 10: '.0'",)
~~~~ - ERROR - Exception in pronounce_number_en: {}ValueError("invalid literal for int() with base 10: '.0'",)
arecord: main:788: audio open error: No such file or directory
20:03:50.952 - __main__:handle_record_begin:35 - INFO - Begin Recording...
20:03:50.966 - AlarmSkill - INFO - on started...
~~~~/pi/mycroft-core/mycroft/res/snd/start_listening.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
20:03:54.208 - __main__:handle_record_end:40 - INFO - End Recording...
I also get this when trying to access the skill logs:
(.venv) pi@picroft:~ $ cat /var/log/mycroft-skills.log | grep -i error | grep -i Audio Record
cat: /var/log/mycroft-skills.log: No such file or directory
grep: Record: No such file or directory
Another issue found with setting audio volume, unsure if somehow related to issue at hand:
20:41:05.468 - __main__:handle_wakeword:56 - INFO - Wakeword Detected: hey mycroft
20:41:07.495 - __main__:handle_utterance:61 - INFO - Utterance: ['set the volume to five']
~~~~0 - mycroft.skills.core:wrapper:874 - ERROR - An error occurred while processing a request in Volume Skill
Traceback (most recent call last):
File "/home/pi/mycroft-core/mycroft/skills/core.py", line 865, in wrapper
handler(message)
File "/opt/mycroft/skills/mycroft-volume.mycroftai/__init__.py", line 95, in handle_set_volume
level = self.__get_volume_level(message, self.mixer.getvolume()[0])
AttributeError: 'VolumeSkill' object has no attribute 'mixer'
if the Utterance start recording for 10 seconds is sent, this triggers the errror, and the recording starts for nine seconds, not ten seconds.
if the Utterance start recording for ten seconds (ie using ten not 10) then the audio records for one minute (the default)
Digging a little deeper into this, the function that is causing the error is pronounce_number_en in the file format_en.pylink which is part of mycroft-core itself.
What I haven’t been able to determine yet is whether the error is triggered when the Skill calculates the duration to record for, or when the feedback is provided to the user about how long the recording is for.
I suspect there is a bug in the nice_duration() function of the Audio Record Skill link specifically because of this line of code:
seconds = int(duration % 60)
Ten seconds modulo 60 rounds down to integer zero.
I’ve raised this as an Issue on the Skill at;
and will liaise with my colleagues to get it investigated / resolved
Viewing logs
Try the filename skills.log instead of mycroft-skills.log - we changed the filename a few months ago for consistency.
Error setting the Volume level
The error no mixer selected means that there is no default audio output selected. Try selecting an audio output with alsamixer.
I think there’s more to it than what you touched upon. I tried recording for one minute (by saying ‘start recording’) and it is simply unable to even store an audio file:
I installed pulseaudio and now the microphone and speaker stopped working. Mycroft neither hears, nor utters any phrases.
When I enter alsamixer, I still get the same options as shown in the screenshots.