Build an open future with us.

Invest in Mycroft and become a community partner.

Record Audio skill is dysfunctional


#1

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.


#2

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.


#3

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

#5

I also got this when asking for the weather:

16:56:20.834 - __main__:handle_wakeword:56 - INFO - Wakeword Detected: hey mycroft

16:56:20.834 - AlarmSkill - INFO - on ended...

16:56:22.454 - __main__:handle_utterance:61 - INFO - Utterance: ["what's the weather"]

16:56:22.744 - __main__:handle_record_begin:35 - INFO - Begin Recording...

16:56:22.753 - AlarmSkill - INFO - on started...

~~~~ng WAVE '/home/pi/mycroft-core/mycroft/res/snd/start_listening.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

16:56:24.390 - mycroft-spotify_forslund:resume:901 - INFO - Resume Spotify

16:56:24.397 - mycroft-spotify_forslund:spotify_play:730 - INFO - spotify_play: 1a907da6a94b25fdfd80d17c15a5863e334cd41f

16:56:25.067 - mycroft-spotify_forslund:__pause:889 - INFO - Pausing Spotify...

16:56:25.107 - mycroft-spotify_forslund:__pause:889 - INFO - Pausing Spotify...

16:56:26.655 - AlarmSkill - INFO - on ended...

16:56:26.643 - __main__:handle_record_end:40 - INFO - End Recording...

16:56:26.657 - __main__:handle_wakeword:56 - INFO - Wakeword Detected: hey mycroft

~~~~2 - mycroft-spotify_forslund:status:106 - ERROR - HTTPSConnectionPool(host='api.spotify.com', port=443): Pool is closed.

~~~~5 - mycroft-spotify_forslund:status:106 - ERROR - HTTPSConnectionPool(host='api.spotify.com', port=443): Pool is closed.

16:56:29.194 - mycroft.client.speech.listener:transcribe:182 - INFO - no words were transcribed

16:56:29.209 - mycroft.client.speech.listener:transcribe:185 - ERROR - Speech Recognition could not understand audio

16:56:30.422 - mycroft-spotify_forslund:resume:901 - INFO - Resume Spotify

16:56:30.431 - mycroft-spotify_forslund:spotify_play:730 - INFO - spotify_play: 1a907da6a94b25fdfd80d17c15a5863e334cd41f

16:56:30.934 - mycroft-spotify_forslund:__pause:889 - INFO - Pausing Spotify...

16:56:31.055 - mycroft-spotify_forslund:__pause:889 - INFO - Pausing Spotify...

16:56:31.374 - mycroft-spotify_forslund:__pause:889 - INFO - Pausing Spotify...

~~~~6 - mycroft-spotify_forslund:status:106 - ERROR - HTTPSConnectionPool(host='api.spotify.com', port=443): Pool is closed.

16:56:36.471 - mycroft-spotify_forslund:resume:901 - INFO - Resume Spotify

16:56:36.507 - mycroft-spotify_forslund:spotify_play:730 - INFO - spotify_play: 1a907da6a94b25fdfd80d17c15a5863e334cd41f

16:56:37.018 - mycroft-spotify_forslund:__pause:889 - INFO - Pausing Spotify...

16:56:37.120 - mycroft-spotify_forslund:__pause:889 - INFO - Pausing Spotify...

~~~~8 - mycroft-spotify_forslund:status:106 - ERROR - HTTPSConnectionPool(host='api.spotify.com', port=443): Pool is closed.

16:56:42.475 - mycroft-spotify_forslund:resume:901 - INFO - Resume Spotify

16:56:42.479 - mycroft-spotify_forslund:spotify_play:730 - INFO - spotify_play: 1a907da6a94b25fdfd80d17c15a5863e334cd41f

^--- NEWEST ---^

#6

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.


#7

Hi,

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...

#8

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

#9

Also Merry Christmas everyone :slight_smile:


#10

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'

#11

Hi there @BobTheBuilder, thanks so much for your helpful diagnostics.

There are multiple issues here, so I’m going to tackle them one by one;

Error in the Audio Recording Skill

I was able to replicate this error:

Specifically, the symptoms are:

  • 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.py link 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.


#12

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:

https://termbin.com/a9j2

01:29:06.188 - __main__:handle_utterance:61 - INFO - Utterance: ['start recording']
arecord: main:788: audio open error: No such file or directory

#13

Also I am confused as to how to change output via alsamixer. When I open it I see following:

Then I press F6:

Then I choose the USB-Camera option and it gives me this:

59%20PM

When I choose the first option instead, nothing changes.


#14

Do you know if pulseaudio is installed on your system?
If so, you might be able to select the source by doing pavucontrol instead.


#15

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.


#16

OK, and if you use pavucontrol to select a microphone and speaker - do they show in pavucontrol?