I went from Picroft to Mycroft on Ubuntu 18.04 to make it a bit easier to develop skills. Now I’m trying to use Mycroft on Ubuntu Mate 18.04 (not a fan of Ubuntu’s default interface ).
However, I can’t get Mycroft to listen, at all. I’m using a Snowball Blue mic which is working fine. I went through audio troubleshooting; recording works fine, playback works fine. I manually set the source, and checked the volume using alsamixer. All seems well, but still not listening.
The mic level bar is and stays empty. I’ve read on the forum that running a soundtest before starting the services helps, or starting the services manually, but no dice.
It did work for a little while on Ubuntu by the way, but stopped working soon after. Didn’t much look into it then.
Thanks for the welcome and the clear screenshots + logs
It definitely looks like your pulseaudio defaults are set correctly based on the screenshots and given your recording and playback is working.
Can you launch pavucontrol and have a look at the ‘Recording’ tab
After you launch ./start-mycroft.sh debug does it show the ALSA python plug-in as a stream?
If you launch Mycroft without the Snowball plugged in, does it register your internal mic?
Finally have you restarted your whole system recently? Just in case the magic restart fairy fixes everything for us.
No luck, but that seems to be focussed on playback?
When running ./start-mycroft.sh audiotest everything works fine, and the plugin shows up as seen in the screenshot below. But as soon as it stops, it disappears, and running Mycroft doesn’t get it back. Does the test somehow use a different plugin? Or perhaps because of the virtual env mycroft is running in?
That is interesting that the audiotest works but Mycroft doesn’t.
I saw in your original logs that /etc/mycroft/mycroft.conf was not defined and hence skipped. Is that still the case? Can you post the output of cat /etc/mycroft/mycroft.conf
And have you made any modifications to ~/.mycroft/mycroft.conf? As this will override anything in /etc/mycroft/mycroft.conf
There was no /etc/mycroft/mycroft.conf but I created it myself (see this post). It now only contains the TTS tag.
Also, I did make changes to ~/.mycroft/mycroft.conf, but as they got overwritten I created the /etc one. It now only contains one tag, something like ‘max allowed version’ (not near the machine atm).
Is there supposed to be a conf in /etc by default?
I really dont know how this resolve it but it works for me. I use the option “all” locales and it take a bit long to finish the reconfiguration but mycroft started listening to me
About the configuration file, I found it in …/mycroft/configurations/mycroft.conf
Thanks @michaelmfzv for taking the time to respond I tried your advice; it’s true that I didn’t have a language set, so I ran the commands and tried both en-US and en-GB but nothing changed
And the following error message keeps popping up in audio.log, but I don’t think it’s related:
21:05:39.950 - mycroft.audio.audioservice:load_services:110 - ERROR - Failed to import module mplayer
ModuleNotFoundError(“No module named ‘py_mplayer’”,)
Is there no dev around that can at least point to a direction as to why recording works during the test, and not when running Mycroft? I’ve already logged considerable hours into this and I haven’t even written a single line of code
Sorry that it’s still not working, audio is a challenge with so many variables across machines and different configurations.
It would be good to try and specify the exact device that Mycroft should use through the config. We usually leave it set as essentially ‘system default’ but in this case that clearly isn’t working.
At the bottom of the output it should have something like:
==========================================
Found devices:
HD-Audio Generic: ALC892 Analog (hw:1,0): Samplerate 44100.0 Channels 2
HD-Audio Generic: ALC892 Alt Analog (hw:1,2): Samplerate 44100.0 Channels 2
pulse: Samplerate 44100.0 Channels 32
default: Samplerate 44100.0 Channels 32
Copy this somewhere so you can reference it.
2. Specifying the device in mycroft.conf
Exit venv if not already ~ $ mycroft-venv-deactivate
Edit configuration file ~ $ nano ~/.mycroft/mycroft.conf
Add the following lines:
"listener": {
"device_name": "DEVICE_NAME"
}
Where “DEVICE_NAME” can be pulse or in the example output above “HD-Audio Generic: ALC892 Analog (hw:1,0)”
3. Restart Mycroft
To make sure it’s fully restarted run:
$ cd ~/mycroft-core
$ ./stop-mycroft.sh
$ ./start-mycroft.sh debug
I’ve also flagged this post with one of our core dev’s to see if they have any other ideas about what might be happening particularly given discrepancy between the audiotest and real usage.
Since the release yesterday the audiotest has an option to list the available devices:
./start-mycroft.sh audiotest -l
which should be simpler than the script I published as a gist.
At this stage we might want to check the voice.log for any errors. The voice.log is found in the folder /var/log/mycroft/ Can you upload this file to pastebin.com or similar service?
Do you get the “Ding” indicating that the device has heard “Hey Mycroft”?
@gez-mycroft Awesome, that seems to have done it It defaulted to nothing, no mic or anything. Think that’s something that Mycroft can maybe implement in the installation or configuration script, to manually select a microphone as a default instead of using the system wide default.
Weird thing is though, that while I can see voice.log scanning for the mic I defined in the conf, it still shows this line at the end of it:
@forslund: I actually have more for you in case you get bored
I tried to switch from pocketsphinx to precise, but that didn’t go well as you can see here.
At 09:50:20.191 there’s actually an error, after that it seems busy recovering itself and now it’s constantly ‘still downloading executable’.
Mycroft indicates it’s using precise as the listener by the way, pavucontrol indicates Python is listening but there’s no voice response to ‘Hey Mycroft’. I’ll let it run for a while and after that revert to pocketsphinx.
Thanks for reporting. Seems like some error handling is appropriate here. I tried to reproduce but couldn’t. Maybe a broken download but it’s a bit weird since the downloader should verify the checksum before extracting… I’m going to flag @Wolfgange to see if he has any suggestions.
In the meantime I suggest removing the ~/.mycroft/precise folder and restart the voice service to see if the a redownload solves the issue.
Went back to pocketsphinx, shutdown Mycroft, deleted the ~/.mycroft/precise folder, restarted Mycroft and attempted to switch to precise - but same thing happened and it’s again in the ‘still downloading executable...’ loop.