Mic just stopped working, Weird Right? and will not come back! Local, USB or Mic Jack

That’s frustrating, sorry to hear you’re having this experience @jnbridges. Can you let us know which audio devices you’re using? Are they USB or plugged into microphone / headphone jack?

Hi Kathy, I tried the onboard sound/mic Lenovo t530, The Sound Jack(apple earbuds) and a USB plantronics headset, all with the same result. seems to take the first command then stops displaying sound data and no longer takes voice commands.

i am following the install instructions from https://www.youtube.com/watch?v=baJxYA9oXm4 geeked out solutions, maybe a better way?

OK, thanks for doing that testing @jnbridges. I’m out of my depth here so going to tag @forslund and @Mn0491to see if they have any suggestions. The log that will be helpful here is the scripts/mycroft-voice.log.

Kind regards,
Kathy

i may have mucked around with some system files after the issue just trying different things, i am not apposed to re-installing Ubuntu, Mycroft etc to get you some clean logs, let me know… Seems like I cant upload the script file here, where should I send it?

This sounds very strange. Sadly I’ve never had any mic trouble. Is the mic unresponsive for the rest of the system as well or only mycroft? @Mn0491 do you have any idea?

Pastebin.com is fine or a github gist if you have a github account

Yes very. Yes the mic’s (all of them) work for the system, just not Mycroft. The area where the mic level shows data just goes dead. Ive done everything, even re-installed Ununtu and Mycroft and it did the same thing, right after answering the first questions … dead. Did you see where I’m installling from? that youtube vid? Maybe its the vitual env. not handling the mic properly? Or is that the only way to install…

Currently for desktop I think it is. There’s a deb pavkage but may or may not be compatible depending on os version.

The install method you’re using should work fine, but obviously isn’t.

The mycroft-voice log will be of interest for debugging

ok, i am going to re-install everything so i can give you a clean log. Maybe its a lenovo thing?

OK, so I did a bunch of different things during install. Most notably, I had the USB headset plugged in during install. Second I chose a different internet connection in case things were being blocked (although i would suspect the install would have failed if that were the case, but i digress) . Also, it looks like the install packages have been upgraded. start-mycroft.sh script is new, before it was mycroft.sh start and start.sh. etc. etc. so anyway things seem to be working, i have paired and so far mycroft is answering as he should.

So… Now i also noticed that I had changed the wake word on home.mycroft.ai so i did some testing there. if I change the wake word on the web, it does not work and it kills the audio. So that might have been the problem all along NEW question - how do you edit the wake word and how would you make a phonemes

That’s a bug introduced in the last release. :frowning: There is a work-around detailed in a reply here: https://github.com/MycroftAI/mycroft-core/issues/1105

Basically a config entry for the name of the wakeword you’ve chosen needs to be created in the “hotword” config.

The issue may be improved in the latest dev branch (since yesterday evening Central European Time).

AH, so that was probably it! I assumed when I deleted the device that the settings were deleted with it. The wake word (the one I put in) was still there from the original install, and once I paired the device, it would see the wake work on the home.mycroft.ai site and kill the audio/mic etc. Thats why it seemed like it worked then didn’t.

OK I think thats actually a good thing. An error that you can track down, reproduce etc. and understand whats going on, and its in the spirit of open software etc. so no worries there.

Whats the best way to upgrade the current install with newer releases?

Since this thread is the only one close to my problem, I´ll just jump in here.
I currently have a similar problem as described in the initial post.
When running mycroft in debug mode it starts up perfectly normal and recognizes voice commands (apart from the fact that no skills are loaded yet). After a minute or so the microphone level display just freezes and it wont recognize any commands anymore. When restarting mycroft the same thing happens again, mic is working for half a minute and goes dead afterwards.
One thing that seems even stranger to me is the fact, that after a few minutes running mycroft my pi just freeze completely.

I have a Raspberry Pi model 3, running the latest version of raspbian stretch. I installed mycroft with the git clone method and have earplugs as audio out and a usb mic as input.

I searched all mycroft log files for error messages, but to me they seem like mycroft is working fine. I already tried reinstalling mycroft and reflashing raspbian however the bug is still present. Another thing to note is that the error occurs on both the current master and dev branch.

Hi,

We’ve not run mycroft all that much on Stretch (picroft and the Mark-1 are still based on jessie)

But generally on a vanilla Raspberry Pi device the default wav playback command needs to be replaced by aplay.

Edit your ~/.mycroft/mycroft.conf and make sure it includes
"play_wav_cmdline": "aplay -Dhw:0,0 %1"

In a fresh installation the entire file would look like this:

{
  "play_wav_cmdline": "aplay -Dhw:0,0 %1"
}

I’m away from my Pi right now but maybe @Mn0491 can do some tests with Stretch?

The problem does not lie with the audio output. I already replaced the pulsaudio command in the config file and audio output is working just fine.
I can talk to mycroft via the cli after the microphone freezes and the tts responds just fine.

One more thing to note is that when starting mycroft initially after booting up the pi the microphone level in the debug screen isn´t displayed at all. The display only shows up when restarting mycroft.

if memory serves, i believe my issue had to do with the fact that I had renamed mycroft (custom name) and my PHONEMES on the home.mycroft.com… advanced settings … was not recognized. Once removed (blank PHONEMES) the problem went away…

Doesn´t seem to change anything. Tried both setting the phonemes to empty or default (which it was on already).

We’ve had ssl problems running it on stretch so we haven’t tested any futher then that. Are you running from a git install or from the debiab package install?

Plain git intall like it is described on the dec page for the linux installation.
Apart from the mic issue mycroft works just fine.

Short update:
I have now tried a fresh install with the picroft image and got the same error, mycroft stops listening on the microphone after a while.
I also tried a different microphone, this time a usb headset and had the same problem again.

Since I am not too familiar with the mycroft-core code could any of you point me at a place where I could start to debug this from in the code itself. As I see it at the moment the Recognizer Loop somehow goes dead withouth throwing an error.

EDIT:
After digging around in the code for a bit I found the problem. The PyAudio stream.read() starts throwing IOErrors and therefore the AudioProducer Thread.
The fix proposed in https://stackoverflow.com/questions/10733903/pyaudio-input-overflowed (the thread was referenced in the code itself) to pass an exception_on_overflow flag to the read method fixes the problem.
I´ll open an issue on github with the proposed fix as soon as I have time for it.

1 Like

Hi, I was having similar issues with the mic and spotted your comment on the ‘ssl issues’ - so I did a fresh Ubuntu Mate 16.04 install, Kinect disconnected and no drivers, instead using usb mic & headset & audio jack - all installed from the console.

Did you mean ‘ssh issues’ ? As that’s what I’m seeing.

Running from console is (for the most part fine - a few things that seem to cause sound hangs) - but mic does stay up and listening for hours.

However, using ssh to login and run mycroft, the mic hangs after a few seconds.
Run it from GUI console and all is ok again.