Read the statement by Michael Teeuw here.
MMM-voice
-
Hi @strawberry-3.141, I’ve just tried running the dependencies.sh from the latest .git to install MMM-voice and hit this error in step 5;
[STEP 5/6] Installing npm dependencies
dependencies.sh: line 106: cd: /root/MagicMirror/modules/MMM-voice: No such file or directory
npm WARN enoent ENOENT: no such file or directory, open ‘/root/pocketsphinx/package.json’despite the fact that pocketsphinx seemed to come down and compile okay. I’m logged in as the pi user via ssh and ran the shell script with sudo bash dependancies.sh.
Do you have any suggestions as to what’s happened?
many thanks
-
@darrene yes dont run the script with sudo. as you can see it tries to install and look for files in root instead of home pi
-
@strawberry-3.141 Doh! Thank you :)
-
Hmm, I too am getting the ‘Error’ mic icon message, once it finishes its initialisation phase when the mirror starts up.
I’m started in dev mode - both the web and terminal consoles look clean - the last report I have in the terminal is 'MMM-voice: Starting pocketsphinx, so I don’t know if I should expect anything further messages in that console.
I’ve taken a look in the MMM-voice/error.log which contains the value ‘127’. It’s repeatable - if i stop the mirror, remove the error log and restart, I get the same results. As a test I’ve tried altering the microphone value in the config.js from it’s initially correct value of 1 - It doesn’t affect the error, which leads me to believe it may not be a hardware issue(?)
It’s such a shame - all steps reported to have completed okay, the microphone was detected - nothing looks to have been out of the ordinary.
Is there anything else I can do to test or anywhere else I can look, before I try flattening the SD card and reinstalling? -
progress of a sort…
tried a sudo apt-get update, followed by a rebootsame clean startups but between the ‘initialising’ and ‘error’ states I briefly get a ‘no mode found’ and the 127 error is gone - now I just get a 1 returned in the error log
-
@darrene no Mode found is the expected behaviour, you can also Enable debug:true this will give You an debug log
-
@strawberry-3.141 Thanks for following this up. That debug switch is a handy one to know :)
I’m now running with debug enabled and pouring over the debug log. Forcing a revisit of that portion of the config.js was the best thing I could have done - I realised that I’d left my Microphone testing value set incorrectly before catching some sleep.
Now that I’ve reset that to ‘1’ - my actual microphone value, as reported by the installer, I no longer get an error.log generated or the onscreen error icon - just the No Mode Detected which is the resting state without debug and an additional ‘undefined’ with debug
This leads me to believe my problem is a Raspian/hardware one, rather than with the module - If I go into the audio device settings in the desktop, I can see my Logitech USB microphone (ALSA mixer) in the selectable sound cards but am unable to make it the default, which stays as bcm2835 ALSA.
If I try arecord to test the mic from the terminal, I get
“arecord: main:682: audio open error No such file or directory”however, if I use 'arecord -D plughw:1,0 test.wav
I get a great wav file recording. Could this be related in some way? I don’t know enough about the code to poke around for the microphone details at this level, to figure out how the installer maps the input device values
-
@darrene you’re all good. just try to say your keyword and voice. then you switch from no mode detected to voice mode
i will propably change that message because you’re not the first one who is confused about no mode detected
Everyone can send me private messages to debug this module when he/she has a problem, we will then post the result here for everyone.
To sum up from the private messages I receive, I see a lot of people having issues, because they run the installer multiple times. Make sure you
remove ~/MagicMirror/modules/MMM-voice/node_modules
, before you run the installer script again. -
Thank you! All good - I’m now gong through the words.json - fabulous!
-
Hi,
At present I try to install the MMM-voice module. I have everything done like it is written in the readme file on Github. Everthing is fine till step3 (installing Pocketsphinx. There is this error: In a second try I try what @Nonamexp say (…I’ve tried the command ‘sudo chmod 777 /opt /home/pi/MagicMirror/modules/MMM-voice’ and than ‘bash dependencies.sh’ and it works!) BUT that didn’t work by me. Can someone explain me what happend and what I could do?
Greets gismo