Experiences with the Pi (audio and wake word)

Jay, there is an issue that I’m working on right now that is causing issues with generic Raspberry Pi’s from starting up. I expect to push the fixes into the master of mycroft-core tonight and get a build pushed out in the next couple days. At that time I’m also going to post a generic Raspian Jessie Lite image with Mycroft preinstalled on it.

Sorry about hassle. Our focus recently was on preparing for the Mycroft Mark 1 unit release and this snuck in under the radar.

Good to hear Steve :slight_smile: I’ve also been having this issue on a generic Raspberry Pi but did manage to get Mycroft working on a Ubuntu VM so it was doubly confusing not getting it to work on the Pi.

thanks much, look forward to it

I’m struggling with the same as the others in this thread.
Everything seems to be working correctly but Mycroft does not pick up on the wake word no matter what I try.

This preinstalled Jessie image mentioned earlier is this available already? I would be really interested to see if that works and compare it to my current installation.

Any update on this? I’m hitting the same wall here with the Pi 3 Jessie Pixel. I’ve tried multiple USB and 3.5mm speakers and microphones with all of them failing. The USB microphone and speakers are defaulted both in the GUI and in /usr/share/alsa/alsa.conf and work outside of mycroft. The mycroft voice service works and starts but the audiotest fails because the rate is 16000KHz instead of the 44100KHz the configs are set to.

Any help here, even if it’s just a point in the right direction, would be greatly appreciated.

I tried a PS3 eye as the USB microphone and a 3.5mm speaker and that setup works. I also switched the rate back to 16000KHz from 441000KHz. Both the audiotest and wake word work now. I think this has to do with what USB microphone you use.

I have a beta image working pretty solidly now, but want to get it hooked in to our new backend once that is release this week before I declare it “1.0”. You can play with the beta if you like, but my lawyer tells me – IT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED … LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE…

:slight_smile:

You can find the “PiCroft 0.5.1” beta image at:
https://drive.google.com/open?id=0B_kLZyk84iy_Q0VvcXhxZHFGMWs

I’m using the 0.8 image and still having the same problems as everyone listed above. Has anyone come up with a solid solution to this problem?

I’m using a Raspberry Pi 3. Have tried several different headphones and using a Blue Snowball mic.

Same problem here on 0.8. I’m using logitech c270 webcam, i can take pictures and mic is working as well.

on terminal im getting below errors:

mycroft.client.speach.listner - ERROR - [( ‘SSL routines’ , ‘SSL3_WRITE_PENDING’ , ‘bad write retry’)]

mycroft.client.speach.listner - ERROR - Speech Recognition could not understand audio

Any idea what may be wrong?

With help from steve.penrod, we found last night that this was the fix for my issue.

On the command line, enter “alsamixer”

Then hit F6, and you should be able to see your microphone.

Select your mic and lower the level. If you are presented with a message such as “No settings for your selection”. Then hit F5 and you should see a entry for CAPTURE. Mine was raised extremely high (89) and I lowered it to 50.

After that reboot your RPi. You should then see on the view_log, Mycroft recording your speech and an answer to your question in the log, followed by the vocal response from Mycroft.

I have also noticed that the wake word needs to be “Hey Mycroft” or else there is no response. Now that I have it working, I’m going to test out different wake words today to verify what is/is not allowed.

Hope this works for you as well!

I have tried that and made no difference, still no joy.

I’m getting below line in view_log. What can be wrong?

2017-01-17 17:42:41,537 - mycroft.configuration - WARNING - Failed to fetch remote configuration: HTTPError(u’The supplied authentication is invalid’,)

Also after the reboot my pi gets stuck on that line. No clue why…

2017-01-17 17:42:41,717 - mycroft.messagebus.client.ws - INFO - Connected

I’ve downloaded and installed version 0.8 on a generic Raspberry Pi 3 (I tried it on a Pi2 as well and got the same outcome). I plugged in my USB microphone and that’s working just fine (so the wake up word activates it to start listening, and if I’m close to the USB microphone, it does successfully capture the audio data and about 1/2 the time it successfully parses the data and I see in the log windows that it’s responding with an answer (I got it to tell the time, give the weather and a couple of other things).

One more thing, I did do an apt-get update and apt-get upgrade and there was about 100MB of updates applied to the 0.8 image.

However, there are some issues (from my perspective at least) as follows:

  1. I can’t get the audio playback to work at all when it’s plugged into the PI2 or Pi3 (I’ve tried multiple speaker systems). I see that there might be some config settings I’ll need to tweak, but it would be helpful to have a definitive answer on that.
  2. Should we really be using a multi-directional microphone to make it work more reliably when I’m not near the USB microphone?
  3. Even though I configured “metric” settings when I created my account in the backend, it ignore that setting when outputting the results on screen (in the logs).
  4. It thinks, I’m in Kansas USA and gives weather responses for that area. I’m actually in Auckland, New Zealand (very far away from Kansas). :slight_smile: Do we need to change the location settings in the image that has been provided or is there an XML or .conf file we need to tweak to change the location?

Overall, I’m quite intrigued by this technology and look forward to what’s coming next with it.

I’d be interested in contributing financially to it. But would like to understand the product roadmap a little better.

Cheers
Allan

Hi Allan,

I’m glad that you are intrigued :slight_smile:

  1. I don’t think this is Mycroft related, you might check alsamixer to see if the correct output is selected and turned up?
  2. A multi-directional mic might indeed help. On the Mark 1 unit we are using a single simple condenser mic with an auto-gain circuit to adjust volume levels, which seems to pick up the room well.
  3. I’m pretty sure the metric setting won’t effect your logging, actually I’m not 100% sure what that setting does. :confused:
  4. We lost the remote location setting when we moved from cerberus.mycroft.ai to home.mycroft.ai. We are gearing up to re-implement that feature as we speak, so that should come next week (tentatively.) In the mean time you can adjust one of you configuration files here:
    https://github.com/MycroftAI/mycroft-core/blob/dev/mycroft/configuration/mycroft.conf#L3
    More about configuration files:
    https://docs.mycroft.ai/development/configuration
    The final config override is the remote configuration from the back end.

I hope this helps and good luck!

Arron

Hi aatchison,

Thanks for your prompt response and the answers to my questions, it’s very much appreciated. One further thought on this, it seems that a number of Raspberry Pi users are having similar issues and perhaps there’s some work that could be done to the autodetect hardware options to improve things on the initial boot-up process (I know the potential array of hardware that could be connected is very large) but not having the correct device ID is a fairly fundamental issue that means only reasonably skillful Linux admins will be able to solve - thereby limiting the people that might use it to start with. - your thoughts?

I’ll do the config tweaks you are suggesting and expect that I’ll be good to go!

I might look into a multi-direction microphone as well though to see if it’s better (it could just be that my NZ accent is a little tough for the system to decode).

I have some thoughts about how your technology could be used (for a particular purpose) and would love to speak more about it and explore those ideas.

Cheers
Allan

Cool!

A utility to set up audio is definitely one of our short term goals.
Feel free to join us on slack for faster interaction:D
http://mycroft-ai-slack-invite.herokuapp.com/

FireBit,

Are you plugged in to a network cable or wifi and connected to the internet? If so, it looks like you need to “pair” the device. You should visit https://home.mycroft.ai and enter the code that is given when Picroft comes up. Usually it is something like AW2RGL, although it shows up in the on-screen logs like “A. W. 2. R. G. L.”

You should also pull down the latest version of the image, I slipstreamed a couple minor changes that might help you.

I made some minor changes to the image to bump it to 0.8a. This makes the wifi setup work (it was broken in most cases) and might fix a few issues for people running Blue Snoball mics, at least.

There are a few other issues being reported that are more general, particularly an error that we are seeing with SSL3. Looks like it is a known problem with an underlying library. I’m looking for a fix for that, and when it is straightened out the image should update itself automatically when we put out a new release of mycroft-core.

You can download the 0.8a image at the same link: https://rebrand.ly/Picroft-0_8

Also, I’d encourage people to use the wiki on the Github repo ( https://github.com/MycroftAI/enclosure-picroft/wiki ) for posting ideas and the Issues ( https://github.com/MycroftAI/enclosure-picroft/issues ) for reporting problems. That way we won’t lose track of them. :slight_smile:

Steve, thank you for your reply. To answer your question , yes im connected to the internet via network cable and I have connection. I also paired my device on home.mycroft.ai with the code generated.

Just tested the new image and it’s still not working. In fact its worse than 0.8, when I pair the device, it seems to work but after reboot, its asking me to pair the device again. So far 5 reboots and had to pair it 5 times.

On 0.8 I was getting my Pi to freeze after pairing and reboot. I have cloned the repo and re run the scripts and it stopped freezing.

I have setup my sound card and mic according to guide, and it seem to work, but is very temperamental. I’ve managed to use wake word but only few times, and it gave me the time and weather. It only happen 3 or 4 times and cant get it to work. I have noticed that im getting massive lag between saying command and the pi doing anything. For example I said few commands and about 5 min later those commands show on the screen and can hear the answer. could it be that the PI 2 is not fast enough? I have 200mb/s pipe to internet so cant be my internet.

Randomly I hear “sorry i didn’t catch that” even tho i don’t speak anything. I used alsmixer to adjust mic volume and my speakers but not difference.

Also looked around the folders and cant find identity2.json, just identity.json. My question is, should I have identity2.json?

Cheers,
Firebit

1 Like

I have just today downloaded and installed the latest image and I am having the same issue. I am not using a standard mic/speaker config, so I will try that when I get the hardware in a few days.

I am currently testing with a Nuance USB power MIC with a built in speaker. I do hear the audio response from the speaker, but the only response I am getting is “sorry i didn’t catch that” no matter which of the core commands I use.

I am also having to re-register the device with every reboot.

Hi Steve, I totally agree with you. We are in the process of learning and we certainly will for the next couple of years. From my perspective it is perfectly fine to have some limits now and build up on those until we can outgrow them. What makes MyCroft great, is the ability to free us from the big guys like google, amazon and apple and still get smart-whatever systems. So keep going. I have to admit though, I wasn’t at all able to get my jessie-image to actually output any voice, but it understands me and I get the feedback in the log.