gauravsacc / MMM-GoogleAssistant

Google Assistant module for magic mirror https://github.com/MichMich/MagicMirror

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After reboot again comes: [FATAL:audio_input_stream.cc(47)] Input device could not be opened: default Aborted

vivian0239 opened this issue · comments

I solved this issue before, assistant.py can run. But MMM still not working. So I reboot RP.
After that, I meet this again:
[FATAL:audio_input_stream.cc(47)] Input device could not be opened: default Aborted
This time the /home/pi/.asoundrc looks good.
I refer #63 use mouse and keyboard directly on RP to open folder manager, and found an extra
file named: packagelock.json, I delete this file, but still has the FATAL issue above.
I tested google assistant again, it works well. But I cannot run assistant.py and MMM.

One thing strange I found there, the speaker icon is gray.

No assistant.py works with this command: python3 -u assistant.py
but when I run MMM, it has error:
[ERROR] Error: Cannot find module 'pubnub'
I already installed pubnub. I don't know why I meet this?

I enter MMM-GoogleAssistant again and npm install, after that MMM can run without error, but assistant.py report error: [FATAL:audio_input_stream.cc(47)] Input device could not be opened: default Aborted
It's weird!

I checked after I run MMM, the assistant.py has run:
(env) pi@raspberrypi:~/MagicMirror/modules/MMM-GoogleAssistant/pi $ ps -aef | grep python
pi 1228 898 4 11:31 pts/0 00:00:51 python3 -u assistant.py
pi 1624 1282 0 11:51 pts/1 00:00:00 grep --color=auto python
but no voice output?

I found the reason, because when I run MMM, assistant.py already run. And I run assistant.py again, mic was used by the first time, so nothing error. And finally MMM run(at the same time I run assistant.py???The first time assistant.py was run by MMM, and after I killed python, it cannot run automatically). The experience is bad. Most of time it cannot get what I said.