Giter Club home page Giter Club logo

mmm-voice's Introduction

MMM-voice GitHub license Build Status Code Climate Known Vulnerabilities API Doc

Voice Recognition Module for MagicMirror2

Information

This voice recognition works offline. To protect your privacy, no one will record what's going on in your room all day long. So keep in mind that there is no huge server farm, that handles your voice commands. The raspberry is just a small device and this is a cpu intensive task. Also the dictionairy has only the words specified by the modules, so there is a chance for false positives.

If you can live with latency, bugged detections and want to have data privacy, feel free to use this module.

Dependencies

Installation

  1. Clone this repo into ~/MagicMirror/modules directory.

  2. Run command bash dependencies.sh in ~/MagicMirror/modules/MMM-voice/installers directory, to install all dependencies. This will need a couple of minutes.

  3. Configure your ~/MagicMirror/config/config.js:

    {
        module: 'MMM-voice',
        position: 'bottom_bar',
        config: {
            microphone: 1,
            ...
        }
    }
    

Config Options

Option Default Description
microphone REQUIRED Id of microphone shown in the installer.
keyword 'MAGIC MIRROR' Keyword the mirror starts to listen. IMPORTANT: Only UPPERCASE Letters
timeout 15 time the keyword should be active without saying something

Usage

You need to say your KEYWORD (Default: MAGIC MIRROR), when the KEYWORD is recognized the microphone will start to flash and as long as the microphone is flashing (timeout config option) the mirror will recognize COMMANDS or MODES (Keep in mind that the recognition will take a while, so when you say your COMMAND right before the microphone stops flashing the COMMAND will propably not recognized).

Mode of this module: VOICE

COMMANDS:

  • HIDE MODULES
  • SHOW MODULES
  • WAKE UP
  • GO TO SLEEP
  • OPEN HELP
  • CLOSE HELP

Select Mode

To select a MODE, the specfic MODE has to be the first word of a COMMAND or right after the KEYWORD, when the microphone stopped flashing.

Supported modules

List of all supported modules in the Wiki.

Developer

  • npm run lint - Lints JS and CSS files.
  • npm run docs - Generates documentation.

Documentation

The documentation can be found here

Developers Guide

If you want to support your own module, check out the Guide and add it to the Wiki.

mmm-voice's People

Contributors

fewieden avatar slametps avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mmm-voice's Issues

ERROR 127

Platform (Hardware/OS):raspberry pi

Node version:

MagicMirror version:

Module version:

Description of the issue:
The microphone initializes then error is shown in error log it says 127

Performance

In the preview it obviously takes to much time to recognize words.

https://vimeo.com/170950524

Because we also have to define recognizable words in front, this is not acceptable.

Dependencie error at [5/5]

At the point [5/5] of the dependencies install script, I get the following error because there is no /root/.npm directory only /root/home/pi/.npm

image 2

Does Voice support a state of Pause?

Platform (Hardware/OS): amd64/Ubuntu 16.04
Node version: 8.15
MagicMirror version: 2.6
Module version: Latest as of Feb 01 2019

Description of the issue:

Does MMM-Voice support receiving notification of Pause and Resume?
Reason for asking is making MMM-Voice send a notification to MMM-AssistantMk2 where this notification get a reply with Pause (configurable reply), whereas MMM-Voice need to stop listening on the microphone.

(A workaround could be where a specific command just timeout the listening time of microphone).

AMK2 support replying with Pause and Resume (configurable replies).

Problem when start MM

Platform (Hardware/OS):
Reaspberry Pi 2 / Jessie Lite

Node version:
v6.10.3

MagicMirror version:
2.1.1.

Module version:
GIT CLONE

Description of the issue:
1|mm | TypeError: this.sendSocketNotification is not a function
1|mm | at fs.appendFile (/home/pi/MagicMirror/modules/MMM-voice/node_helper.js:311:22)
1|mm | at /home/pi/MagicMirror/modules/MMM-voice/node_modules/graceful-fs/graceful-fs.js:43:10
1|mm | at FSReqWrap.oncomplete (fs.js:112:15)

Error: acmod.c - potential pocketsphinx error in debug.log

Platform (Hardware/OS): Linux raspberrypi 5.10.103-v7l+

Node version: v18.18.0

MagicMirror version: 2.25.0

Module version: 1.0.2

Description of the issue: I followed installation instructions, however when I ran bash dependencies.sh under installers, I noticed that pocketsphinx was not installed as the installation commands (./autogen.sh, ./configure, make, make install) are no longer valid - it requires cmake --build build --target install as per the README). I manually installed pocketsphinx, but realized that it did not install pocketsphinx-continuous binary. I had to install pocketsphinx again using apt-get, and this time I have pocketsphinx-continous binary, however when I run MagicMirror I am getting this error in debug.log under MMM-voice module:

Current configuration:
[NAME]			[DEFLT]		[VALUE]
-agc			none		none
-agcthresh		2.0		2.000000e+00
-allphone				
-allphone_ci		no		no
-alpha			0.97		9.700000e-01
-ascale			20.0		2.000000e+01
-aw			1		1
-backtrace		no		no
-beam			1e-48		1.000000e-48
-bestpath		yes		yes
-bestpathlw		9.5		9.500000e+00
-ceplen			13		13
-cmn			live		live
-cmninit		40,3,-1		40,3,-1
-compallsen		no		no
-debug					0
-dict					modules/MMM-voice/MMM-voice.dic
-dictcase		no		no
-dither			no		no
-doublebw		no		no
-ds			1		1
-fdict					
-feat			1s_c_d_dd	1s_c_d_dd
-featparams					
-fillprob		1e-8		1.000000e-08
-frate			100		100
-fsg					
-fsgusealtpron		yes		yes
-fsgusefiller		yes		yes
-fwdflat		yes		yes
-fwdflatbeam		1e-64		1.000000e-64
-fwdflatefwid		4		4
-fwdflatlw		8.5		8.500000e+00
-fwdflatsfwin		25		25
-fwdflatwbeam		7e-29		7.000000e-29
-fwdtree		yes		yes
-hmm					
-input_endian		little		little
-jsgf					
-keyphrase				
-kws					
-kws_delay		10		10
-kws_plp		1e-1		1.000000e-01
-kws_threshold		1		1.000000e+00
-latsize		5000		5000
-lda					
-ldadim			0		0
-lifter			0		0
-lm					modules/MMM-voice/MMM-voice.lm
-lmctl					
-lmname					
-logbase		1.0001		1.000100e+00
-logfn					
-logspec		no		no
-lowerf			133.33334	1.333333e+02
-lpbeam			1e-40		1.000000e-40
-lponlybeam		7e-29		7.000000e-29
-lw			6.5		6.500000e+00
-maxhmmpf		30000		30000
-maxwpf			-1		-1
-mdef					
-mean					
-mfclogdir				
-min_endfr		0		0
-mixw					
-mixwfloor		0.0000001	1.000000e-07
-mllr					
-mmap			yes		yes
-ncep			13		13
-nfft			512		512
-nfilt			40		40
-nwpen			1.0		1.000000e+00
-pbeam			1e-48		1.000000e-48
-pip			1.0		1.000000e+00
-pl_beam		1e-10		1.000000e-10
-pl_pbeam		1e-10		1.000000e-10
-pl_pip			1.0		1.000000e+00
-pl_weight		3.0		3.000000e+00
-pl_window		5		5
-rawlogdir				
-remove_dc		no		no
-remove_noise		yes		yes
-remove_silence		yes		yes
-round_filters		yes		yes
-samprate		16000		1.600000e+04
-seed			-1		-1
-sendump				
-senlogdir				
-senmgau				
-silprob		0.005		5.000000e-03
-smoothspec		no		no
-svspec					
-tmat					
-tmatfloor		0.0001		1.000000e-04
-topn			4		4
-topn_beam		0		0
-toprule				
-transform		legacy		legacy
-unit_area		yes		yes
-upperf			6855.4976	6.855498e+03
-uw			1.0		1.000000e+00
-vad_postspeech		50		50
-vad_prespeech		20		20
-vad_startspeech	10		10
-vad_threshold		2.0		2.000000e+00
-var					
-varfloor		0.0001		1.000000e-04
-varnorm		no		no
-verbose		no		no
-warp_params				
-warp_type		inverse_linear	inverse_linear
-wbeam			7e-29		7.000000e-29
-wip			0.65		6.500000e-01
-wlen			0.025625	2.562500e-02

INFO: feat.c(715): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='live', VARNORM='no', AGC='none'
**ERROR: "acmod.c", line 76: Acoustic model definition is not specified either with -mdef option or with -hmm**

The error.log has the following entry:

1

I am assuming that I am missing something in pocketsphinx installation - is there a specific configuration that I should add to pocketsphinx?

Error during

Platform (Hardware/OS):
Raspian
Node version:
v9.11.1
Module version:
v1.0.2
Description of the issue:
When I start the module, it goes from "Initialisieren..." to "ERROR".
I start the MagicMirror with "npm start" and the command line doesn't throw any errors. Just:
MMM-voice: Checking files.
MMM-voice: Starting pocketsphinx.
So everything looks alright to me.
My microphone is conected via usb and works fine.

I tried all the solutions from other issues but it just doesn't work. I would appreciate any kind of help!

Thanks in advance!

Getting Error on Electron

screenshot_20181128-001115
Platform (Hardware/OS): pi3b+

Description of the issue:
The installation went pretty smooth. No errors. I added the config as follows :
{
module: 'MMM-voice',
position: 'bottom_bar',
config: {
microphone: 1,
}
},

Getting Error besides the voice icon on electron.

Can I make others commands

Platform (Hardware/OS): Raspberry Pi3

Node version: 4.2.1v

MagicMirror version: 2.1.2v

Module version: I don't download this module yet.

Description of the issue:
I wanna make others command.
Such command have their working.
( ex. turn on a light, turn on the electric fan, etc)
Can I do that?
If I can do, what should I do?

Failing at the 5. Step

Platform (Hardware/OS): raspbian jessie

Node version: v4.0.0

MagicMirror version: v2.2.2

Description of the issue: I followed the description and everything went well till the 5 step.
Here i got this Error.
p.s. I tried to run it with as root, didn't work.
Can anyone help plsss ??

[STEP 4/5] Exporting paths | Done
[STEP 5/5] Installing npm dependencies
npm WARN engine [email protected]: wanted: {"node":">=4.2.1"} (current: {"node":"4.0.0","npm":"2.14.2"})
npm WARN engine [email protected]: wanted: {"node":">=4.2.0"} (current: {"node":"4.0.0","npm":"2.14.2"})
npm ERR! tar.unpack untar error /home/pi/.npm/pocketsphinx-continuous/1.0.0/package.tgz
npm ERR! tar.unpack untar error /home/pi/.npm/eslint-plugin-import/2.8.0/package.tgz
npm ERR! tar.unpack untar error /home/pi/.npm/stylelint-config-standard/16.0.0/package.tgz
npm ERR! tar.unpack untar error /home/pi/.npm/eslint-config-airbnb-base/11.3.2/package.tgz
npm ERR! tar.unpack untar error /home/pi/.npm/lmtool/2.0.3/package.tgz
npm ERR! tar.unpack untar error /home/pi/.npm/stylelint/7.13.0/package.tgz
npm ERR! tar.unpack untar error /home/pi/.npm/jsdoc/3.5.5/package.tgz
npm ERR! tar.unpack untar error /home/pi/.npm/eslint/3.19.0/package.tgz
npm ERR! Linux 4.9.35-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--productive"
npm ERR! node v4.0.0
npm ERR! npm v2.14.2
npm ERR! path /home/pi/MagicMirror/modules/MMM-voice/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/home/pi/MagicMirror/modules/MMM-voice/node_modules'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, mkdir '/home/pi/MagicMirror/modules/MMM-voice/node_modules']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/home/pi/MagicMirror/modules/MMM-voice/node_modules',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/home/pi/MagicMirror/modules/MMM-voice/node_modules/pocketsphinx-continuous',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:171:25',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53',
npm ERR! 'FSReqWrap.oncomplete (fs.js:82:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Linux 4.9.35-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--productive"
npm ERR! node v4.0.0
npm ERR! npm v2.14.2
npm ERR! path npm-debug.log.0a2c13c70744073bdb743eea569c635d
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall open

npm ERR! Error: EACCES: permission denied, open 'npm-debug.log.0a2c13c70744073bdb743eea569c635d'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, open 'npm-debug.log.0a2c13c70744073bdb743eea569c635d']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'open',
npm ERR! path: 'npm-debug.log.0a2c13c70744073bdb743eea569c635d' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/MagicMirror/modules/MMM-voice/npm-debug.log
[STEP 5/5] Installing npm dependencies | Failed

Error when starting

Platform (Hardware/OS):
Unbuntu 16

Node version:
8.9.4
MagicMirror version:
2.2.2
Module version:
Lastest Master
Description of the issue:
when starting it intializes then goes right to ERROR
When run in debug: true it says undefined.
I ran the command line and my mic is 0.....

Not sure what's undefined but I've tried the mic at 0 and 1......still get ERROR

MMM error when enable debug

0|mm | TypeError: Cannot read property 'debug' of undefined
0|mm | at PocketSphinxContinuous.handleData (/home/pi/MagicMirror/modules/MMM-voice/node_helper.js:247:28)
0|mm | at emitOne (events.js:96:13)
0|mm | at PocketSphinxContinuous.emit (events.js:191:7)
0|mm | at Socket. (/home/pi/MagicMirror/modules/MMM-voice/node_modules/pocketsphinx-continuous/index.js:39:11)
0|mm | at emitOne (events.js:96:13)
0|mm | at Socket.emit (events.js:191:7)
0|mm | at readableAddChunk (_stream_readable.js:178:18)
0|mm | at Socket.Readable.push (_stream_readable.js:136:10)
0|mm | at Pipe.onread (net.js:560:20)

Voice recognition

Hi first of all thank you for your awesome project!
Since english is not my first language i'm having trouble with my commands not being recognized properly. I just want to use simple functions such as "Go to sleep" or "wake up" but are there any ways for the commands to be adapted to my voice?

Getting ERROR next to mic when running MagicMirror

Platform (Hardware/OS):Stretch

Node version:

MagicMirror version: 2.8

Module version:newest

Description of the issue:No matter what i do the software doesn't seem to be able to pic up my mic or something, have troubleshooted a lot on the MM forum, but just can't seem to get it to work. My mic works and have tested it as plughw:1,0, and i have changed the mic config in the files to be that way, but it still won't work. Don't know if there is another issue or not but would greatly appreciate help. Thanks in advance.
debug.log
error.log

Microphone Error

Platform (Hardware/OS): Raspberry Pi 3 B (rev1.2) / Bullseye (11)

Node version: v16.20.0

MagicMirror version: 2.23.0

Module version: 1.0.2

Description of the issue: I cannot get the microphone to work. Neither an analog one nor from the camera.
What am I missing?

My devices from /proc/asound/cards
rpi@rpi:~/MagicMirror $ cat /proc/asound/cards 0 [Headphones ]: bcm2835_headpho - bcm2835 Headphones bcm2835 Headphones 1 [HD3000 ]: USB-Audio - Microsoft® LifeCam HD-3000 Microsoft Microsoft® LifeCam HD-3000 at usb-3f980000.usb-1.3, high speed 2 [vc4hdmi ]: vc4-hdmi - vc4-hdmi vc4-hdmi

The error log from the /modules/MMM-voice/error.log
rpi@rpi:~/MagicMirror $ cat modules/MMM-voice/error.log Error: spawn pocketsphinx_continuous ENOENT -2 Error: spawn pocketsphinx_continuous ENOENT -2 Error: spawn pocketsphinx_continuous ENOENT -2 Error: spawn pocketsphinx_continuous ENOENT -2 Error: spawn pocketsphinx_continuous ENOENT -2 Error: spawn pocketsphinx_continuous ENOENT -2 Error: spawn pocketsphinx_continuous ENOENT -2 Error: spawn pocketsphinx_continuous ENOENT -2 Error: spawn pocketsphinx_continuous ENOENT -2 Error: spawn pocketsphinx_continuous ENOENT -2

I have tested the microphone with arecord and playback with asound, and they both work properly.
I also tried the solution provided regarding the ldconfig , which plenty of other people had.

Please let me know how and if I can provide you with any additional log files.
Thank you.

Installing pocketsphinx | Failed

Platform (Hardware/OS): Raspberry Pi 3 Raspbian Stretch

Node version:

MagicMirror version: The latest one

Module version:

Description of the issue:
Attempting to install MMM-voice until an error occurs in step 3 saying "Installing pocketsphinx | Failed"

LANG: Spanish

Ey!
Now that i got it working, i want to use commands in spanish.
How could i do that? Do i have to re-write de dictionary and the rest of files?

Thanks!

MMM-voice Error

Platform (Hardware/OS): Raspberry Pi4B

Node version:

MagicMirror version: 2.14.0

Module version: #14

Description of the issue: pocketsphinx_continuous: error while loading shared libraries: libpocketsphinx.so.3: cannot open shared object file: No such file or directory
This is the only i was able to get out of debug.log
If i can provide more information, please ask

How to lock commands (using lockstrings?)

Hi everyone,

I´m completly new to rpi/MM/python but somehow managed to keep it running with some modules. I have following problem (dont know if its a Problem about MMM-voice or MMM-Facial-Recognition):

If I hide my modules with the voice module, every module will be showed again when my MMM-Facial-Recognition Module logs in/out a user. I already read about using "lockStrings" which could block the Facial Recognition to not show the modules again as long as they are hidden with the mmm-voice command, but i have no clue how and where to set them correctly.

Maybe someone faced my problem before and is able to help me out, that would be really awesome. I´m grateful for every help.

Cheers Felix

Change language

Platform (Hardware/OS): Raspberry PI 3

Node version: LAST

MagicMirror version: LAST

Module version: LAST

Description of the issue: Hello, I'm trying to change the language so I modified the file .dic but you said that you use an online version of pocketsphinx so I think that modify files .dic, .lm, words.json etc..
I did the debug : true but I don't see the words I had added even if I see the in the file .dic
Can you help me please?

ERROR on loading Module

Hi,

today I tried to run your module, but all I get is an error messsage on my mirror:

Message on mirror (gif):
voice_error

Message on terminal:
error_voice

I took a look in error.log, it says "127".

First I thought, my microphone is not found, but:

 0 [ALSA           ]: bcm2835 - bcm2835 ALSA
                      bcm2835 ALSA
 1 [Device         ]: USB-Audio - USB PnP Sound Device
                      C-Media Electronics Inc. USB PnP Sound Device at usb-3f980000.usb-1.4, full

Config is:

            {
                    module: 'MMM-voice',
                    position: 'bottom_bar',
                    config: {
                            microphone: 1,
                            // ...
                    }
            },

So my question is: Do you have an idea, why it' not working. I wasn't able to find out, what error "127" could mean.

Thx in advance

moFries

Error: spawn pocketsphinx_continuous ENOENT

Platform (Hardware/OS):
Raspberry Pi 2B
Raspbian wheezy
Linux rp3 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux

Node version:
node v6.11.4

MagicMirror version:
[email protected] (as of 2017-10-08)

Module version:
1.02 (as of 2017-10-08)

Description of the issue:
{
disabled: false,
module: 'MMM-voice',
position: 'bottom_bar',
config: {
microphone: 1,
keyword: 'MAGIC MIRROR',
timeout: 15
}
},

Error: spawn pocketsphinx_continuous ENOENT
-2

The thing is, pocketsphinx_continuous itself works!

pocketsphinx_continuous -adcdev plughw:1 -inmic yes

I'm out of ideas.

Help with installation

Platform (Hardware/OS): Pi 3 Model B

Node version: 9.11.2

MagicMirror version: 2.4.1

Module version: 1.0.2

Description of the issue:
Hey, I would like some help installing the module. I've tried numerous times, always kept getting one error or another. Decided to scrap the OS and start fresh in case I had changed some file I should not have while pursuing the error codes and their fixes.

On this last install I got an error at the end of the install:
link to pic of error

Continued with the instructions putting it in the config file:

                {
                    module: 'MMM-voice',
                    position: 'bottom_bar',
                    config: {
                                microphone: 1,
                                keyword: 'MAGIC MIRROR',
                                timeout: 15,
                            }
                },

AND now my MM screen is blank (just black).

Checked the pm2 log and got back:

pi@raspberrypi:~/MagicMirror $ pm2 logs MagicMirror
[TAILING] Tailing last 15 lines for [MagicMirror] process (change the value with --lines option)
/home/pi/.pm2/logs/MagicMirror-error.log last 15 lines:
0|MagicMir | at Object. (/home/pi/MagicMirror/modules/MMM-voice/node_helper.js:369:3)
0|MagicMir | at Module._compile (module.js:642:30)
0|MagicMir | at Object.Module._extensions..js (module.js:653:10)
0|MagicMir | at Module.load (module.js:561:32)
0|MagicMir | { Error: Cannot find module 'pocketsphinx-continuous'
0|MagicMir | at Module._resolveFilename (module.js:543:15)
0|MagicMir | at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
0|MagicMir | at Function.Module._load (module.js:473:25)
0|MagicMir | at Module.require (module.js:586:17)
0|MagicMir | at require (internal/module.js:11:18)
0|MagicMir | at Object. (/home/pi/MagicMirror/modules/MMM-voice/node_helper.js:14:13)
0|MagicMir | at Object. (/home/pi/MagicMirror/modules/MMM-voice/node_helper.js:369:3)
0|MagicMir | at Module._compile (module.js:642:30)
0|MagicMir | at Object.Module._extensions..js (module.js:653:10)
0|MagicMir | at Module.load (module.js:561:32) code: 'MODULE_NOT_FOUND' }

/home/pi/.pm2/logs/MagicMirror-out.log last 15 lines:
0|MagicMir | Module helper loaded: MMM-Remote-Control
0|MagicMir | No helper found for module: clock.
0|MagicMir | Initializing new module helper ...
0|MagicMir | Module helper loaded: calendar
0|MagicMir | Initializing new module helper ...
0|MagicMir | Module helper loaded: MMM-quote-of-the-day
0|MagicMir | No helper found for module: currentweather.
0|MagicMir | No helper found for module: weatherforecast.
0|MagicMir | No helper found for module: worldclock.
0|MagicMir | Initializing new module helper ...
0|MagicMir | Module helper loaded: MMM-MTA-NextBus
0|MagicMir | Whoops! There was an uncaught exception...
0|MagicMir | MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
0|MagicMir | If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
0|MagicMir | Launching application.

Commenting it out of the config file got my page up and running again w/out the voice module. Any clue as to what to do?

Error opening audio device plughw:0 for capture: Device or resource busy FATAL: "continuous.c", line 245: Failed to open audio device

Platform (Hardware/OS):Rasbian v9 Stretch

Node version:10.10.0

MagicMirror version:2.4.1

Module version:Latest

Description of the issue: Error opening audio device plughw:0 for capture: Device or resource busy
FATAL: "continuous.c", line 245: Failed to open audio device

Hello,

I have been trying to run the module but it keeps saying Error Undefined when I do.
I am not sure if it is because I am using the Google AIY Voice Hat (It's not USB) or if it's something
else.

I have config set to 0 as cat /proc/asound/cards returns:
0 [sndrpigooglevoi]: snd_rpi_googlev - snd_rpi_googlevoicehat_soundcar snd_rpi_googlevoicehat_soundcard 1 [HD3000 ]: USB-Audio - Microsoft® LifeCam HD-3000 Microsoft Microsoft® LifeCam HD-3000 at usb-3f980000.usb-1.3, high speed
Note, the Google soundcard is what I wish to use although I get the same error when I put 1 in and try to use the Lifecam.

My Debug log is:

`INFO: pocketsphinx.c(153): Parsed model-specific feature parameters from /usr/local/share/pocketsphinx/model/en-us/en-us/feat.params
Current configuration:
[NAME] [DEFLT] [VALUE]
-agc none none
-agcthresh 2.0 2.000000e+00
-allphone
-allphone_ci yes yes
-alpha 0.97 9.700000e-01
-ascale 20.0 2.000000e+01
-aw 1 1
-backtrace no no
-beam 1e-48 1.000000e-48
-bestpath yes yes
-bestpathlw 9.5 9.500000e+00
-ceplen 13 13
-cmn live batch
-cmninit 40,3,-1 41.00,-5.29,-0.12,5.09,2.48,-4.07,-1.37,-1.78,-5.08,-2.05,-6.45,-1.42,1.17
-compallsen no no
-dict modules/MMM-voice/MMM-voice.dic
-dictcase no no
-dither no no
-doublebw no no
-ds 1 1
-fdict
-feat 1s_c_d_dd 1s_c_d_dd
-featparams
-fillprob 1e-8 1.000000e-08
-frate 100 100
-fsg
-fsgusealtpron yes yes
-fsgusefiller yes yes
-fwdflat yes yes
-fwdflatbeam 1e-64 1.000000e-64
-fwdflatefwid 4 4
-fwdflatlw 8.5 8.500000e+00
-fwdflatsfwin 25 25
-fwdflatwbeam 7e-29 7.000000e-29
-fwdtree yes yes
-hmm /usr/local/share/pocketsphinx/model/en-us/en-us
-input_endian little little
-jsgf
-keyphrase
-kws
-kws_delay 10 10
-kws_plp 1e-1 1.000000e-01
-kws_threshold 1e-30 1.000000e-30
-latsize 5000 5000
-lda
-ldadim 0 0
-lifter 0 22
-lm modules/MMM-voice/MMM-voice.lm
-lmctl
-lmname
-logbase 1.0001 1.000100e+00
-logfn
-logspec no no
-lowerf 133.33334 1.300000e+02
-lpbeam 1e-40 1.000000e-40
-lponlybeam 7e-29 7.000000e-29
-lw 6.5 6.500000e+00
-maxhmmpf 30000 30000
-maxwpf -1 -1
-mdef
-mean
-mfclogdir
-min_endfr 0 0
-mixw
-mixwfloor 0.0000001 1.000000e-07
-mllr
-mmap yes yes
-ncep 13 13
-nfft 512 512
-nfilt 40 25
-nwpen 1.0 1.000000e+00
-pbeam 1e-48 1.000000e-48
-pip 1.0 1.000000e+00
-pl_beam 1e-10 1.000000e-10
-pl_pbeam 1e-10 1.000000e-10
-pl_pip 1.0 1.000000e+00
-pl_weight 3.0 3.000000e+00
-pl_window 5 5
-rawlogdir
-remove_dc no no
-remove_noise yes yes
-remove_silence yes yes
-round_filters yes yes
-samprate 16000 1.600000e+04
-seed -1 -1
-sendump
-senlogdir
-senmgau
-silprob 0.005 5.000000e-03
-smoothspec no no
-svspec 0-12/13-25/26-38
-tmat
-tmatfloor 0.0001 1.000000e-04
-topn 4 4
-topn_beam 0 0
-toprule
-transform legacy dct
-unit_area yes yes
-upperf 6855.4976 6.800000e+03
-uw 1.0 1.000000e+00
-vad_postspeech 50 50
-vad_prespeech 20 20
-vad_startspeech 10 10
-vad_threshold 3.0 3.000000e+00
-var
-varfloor 0.0001 1.000000e-04
-varnorm no no
-verbose no no
-warp_params
-warp_type inverse_linear inverse_linear
-wbeam 7e-29 7.000000e-29
-wip 0.65 6.500000e-01
-wlen 0.025625 2.562500e-02

INFO: feat.c(715): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='batch', VARNORM='no', AGC='none'
INFO: acmod.c(162): Using subvector specification 0-12/13-25/26-38
INFO: mdef.c(518): Reading model definition: /usr/local/share/pocketsphinx/model/en-us/en-us/mdef
INFO: mdef.c(531): Found byte-order mark BMDF, assuming this is a binary mdef file
INFO: bin_mdef.c(336): Reading binary model definition: /usr/local/share/pocketsphinx/model/en-us/en-us/mdef
INFO: bin_mdef.c(516): 42 CI-phone, 137053 CD-phone, 3 emitstate/phone, 126 CI-sen, 5126 Sen, 29324 Sen-Seq
INFO: tmat.c(149): Reading HMM transition probability matrices: /usr/local/share/pocketsphinx/model/en-us/en-us/transition_matrices
INFO: acmod.c(113): Attempting to use PTM computation module
INFO: ms_gauden.c(127): Reading mixture gaussian parameter: /usr/local/share/pocketsphinx/model/en-us/en-us/means
INFO: ms_gauden.c(242): 42 codebook, 3 feature, size:
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(127): Reading mixture gaussian parameter: /usr/local/share/pocketsphinx/model/en-us/en-us/variances
INFO: ms_gauden.c(242): 42 codebook, 3 feature, size:
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(304): 222 variance values floored
INFO: ptm_mgau.c(475): Loading senones from dump file /usr/local/share/pocketsphinx/model/en-us/en-us/sendump
INFO: ptm_mgau.c(499): BEGIN FILE FORMAT DESCRIPTION
INFO: ptm_mgau.c(562): Rows: 128, Columns: 5126
INFO: ptm_mgau.c(594): Using memory-mapped I/O for senones
INFO: ptm_mgau.c(837): Maximum top-N: 4
INFO: phone_loop_search.c(114): State beam -225 Phone exit beam -225 Insertion penalty 0
INFO: dict.c(320): Allocating 4130 * 20 bytes (80 KiB) for word entries
INFO: dict.c(333): Reading main dictionary: modules/MMM-voice/MMM-voice.dic
INFO: dict.c(213): Dictionary size 29, allocated 0 KiB for strings, 0 KiB for phones
INFO: dict.c(336): 29 words read
INFO: dict.c(358): Reading filler dictionary: /usr/local/share/pocketsphinx/model/en-us/en-us/noisedict
INFO: dict.c(213): Dictionary size 34, allocated 0 KiB for strings, 0 KiB for phones
INFO: dict.c(361): 5 words read
INFO: dict2pid.c(396): Building PID tables for dictionary
INFO: dict2pid.c(406): Allocating 42^3 * 2 bytes (144 KiB) for word-initial triphones
INFO: dict2pid.c(132): Allocated 21336 bytes (20 KiB) for word-final triphones
INFO: dict2pid.c(196): Allocated 21336 bytes (20 KiB) for single-phone word triphones
INFO: ngram_model_trie.c(354): Trying to read LM in trie binary format
INFO: ngram_model_trie.c(365): Header doesn't match
INFO: ngram_model_trie.c(177): Trying to read LM in arpa format
INFO: ngram_model_trie.c(193): LM of order 3
INFO: ngram_model_trie.c(195): #1-grams: 25
INFO: ngram_model_trie.c(195): #2-grams: 46
INFO: ngram_model_trie.c(195): #3-grams: 23
INFO: lm_trie.c(474): Training quantizer
INFO: lm_trie.c(482): Building LM trie
INFO: ngram_search_fwdtree.c(74): Initializing search tree
INFO: ngram_search_fwdtree.c(101): 28 unique initial diphones
INFO: ngram_search_fwdtree.c(186): Creating search channels
INFO: ngram_search_fwdtree.c(323): Max nonroot chan increased to 157
INFO: ngram_search_fwdtree.c(333): Created 28 root, 29 non-root channels, 5 single-phone words
INFO: ngram_search_fwdflat.c(157): fwdflat: min_ef_width = 4, max_sf_win = 25
INFO: continuous.c(307): pocketsphinx_continuous COMPILED ON: Sep 19 2018, AT: 22:43:41

Error opening audio device plughw:0 for capture: Device or resource busy
FATAL: "continuous.c", line 245: Failed to open audio device
`

I tried doing:
LD_LIBRARY_PATH=/usr/local/lib PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

This helped with a different problem I was having before but I now have this issue which I can't seem to find a fix for.

Please help and explain in steps and language that a beginner at raspberry Pi and indeed Linux can comprehend.

Thank you very much in advance.

Cannot find the MMM-voice.dic

ERROR: "dict.c", line 275: Failed to open dictionary file 'modules/MMM-voice/MMM-voice.dic' for reading: No such file or directory

xps:~/MagicMirror$ more modules/MMM-voice/debug.log
INFO: pocketsphinx.c(153): Parsed model-specific feature parameters from /usr/local/share/pocketsphinx/model/en-us/en-us/feat.params
Current configuration:
[NAME] [DEFLT] [VALUE]
-agc none none
-agcthresh 2.0 2.000000e+00
-allphone
-allphone_ci yes yes
-alpha 0.97 9.700000e-01
-ascale 20.0 2.000000e+01
-aw 1 1
-backtrace no no
-beam 1e-48 1.000000e-48
-bestpath yes yes
-bestpathlw 9.5 9.500000e+00
-ceplen 13 13
-cmn live batch
-cmninit 40,3,-1 41.00,-5.29,-0.12,5.09,2.48,-4.07,-1.37,-1.78,-5.08,-2.05,-6.45,-1.42,1.17
-compallsen no no
-dict modules/MMM-voice/MMM-voice.dic
-dictcase no no
-dither no no
-doublebw no no
-ds 1 1
-fdict
-feat 1s_c_d_dd 1s_c_d_dd
-featparams
-fillprob 1e-8 1.000000e-08
-frate 100 100
-fsg
-fsgusealtpron yes yes
-fsgusefiller yes yes
-fwdflat yes yes
-fwdflatbeam 1e-64 1.000000e-64
-fwdflatefwid 4 4
-fwdflatlw 8.5 8.500000e+00
-fwdflatsfwin 25 25
-fwdflatwbeam 7e-29 7.000000e-29
-fwdtree yes yes
-hmm /usr/local/share/pocketsphinx/model/en-us/en-us
-input_endian little little
-jsgf
-keyphrase
-kws
-kws_delay 10 10
-kws_plp 1e-1 1.000000e-01
-kws_threshold 1e-30 1.000000e-30
-latsize 5000 5000
-lda
-ldadim 0 0
-lifter 0 22
-lm modules/MMM-voice/MMM-voice.lm
-lmctl
-lmname
-logbase 1.0001 1.000100e+00
-logfn
-logspec no no
-lowerf 133.33334 1.300000e+02
-lpbeam 1e-40 1.000000e-40
-lponlybeam 7e-29 7.000000e-29
-lw 6.5 6.500000e+00
-maxhmmpf 30000 30000
-maxwpf -1 -1
-mdef
-mean
-mfclogdir
-min_endfr 0 0
-mixw
-mixwfloor 0.0000001 1.000000e-07
-mllr
-mmap yes yes
-ncep 13 13
-nfft 512 512
-nfilt 40 25
-nwpen 1.0 1.000000e+00
-pbeam 1e-48 1.000000e-48
-pip 1.0 1.000000e+00
-pl_beam 1e-10 1.000000e-10
-pl_pbeam 1e-10 1.000000e-10
-pl_pip 1.0 1.000000e+00
-pl_weight 3.0 3.000000e+00
-pl_window 5 5
-rawlogdir
-remove_dc no no
-remove_noise yes yes
-remove_silence yes yes
-round_filters yes yes
-samprate 16000 1.600000e+04
-seed -1 -1
-sendump
-senlogdir
-senmgau
-silprob 0.005 5.000000e-03
-smoothspec no no
-svspec 0-12/13-25/26-38
-tmat
-tmatfloor 0.0001 1.000000e-04
-topn 4 4
-topn_beam 0 0
-toprule
-transform legacy dct
-unit_area yes yes
-upperf 6855.4976 6.800000e+03
-uw 1.0 1.000000e+00
-vad_postspeech 50 50
-vad_prespeech 20 20
-vad_startspeech 10 10
-vad_threshold 3.0 3.000000e+00
-var
-varfloor 0.0001 1.000000e-04
-varnorm no no
-verbose no no
-warp_params
-warp_type inverse_linear inverse_linear
-wbeam 7e-29 7.000000e-29
-wip 0.65 6.500000e-01
-wlen 0.025625 2.562500e-02
INFO: feat.c(715): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='batch', VARNORM='no', AGC='none'
INFO: acmod.c(162): Using subvector specification 0-12/13-25/26-38
INFO: mdef.c(518): Reading model definition: /usr/local/share/pocketsphinx/model/en-us/en-us/mdef
INFO: mdef.c(531): Found byte-order mark BMDF, assuming this is a binary mdef file
INFO: bin_mdef.c(336): Reading binary model definition: /usr/local/share/pocketsphinx/model/en-us/en-us/mdef
INFO: bin_mdef.c(516): 42 CI-phone, 137053 CD-phone, 3 emitstate/phone, 126 CI-sen, 5126 Sen, 29324 Sen-Seq
INFO: tmat.c(149): Reading HMM transition probability matrices: /usr/local/share/pocketsphinx/model/en-us/en-us/transition_matrices
INFO: acmod.c(113): Attempting to use PTM computation module
INFO: ms_gauden.c(127): Reading mixture gaussian parameter: /usr/local/share/pocketsphinx/model/en-us/en-us/means
INFO: ms_gauden.c(242): 42 codebook, 3 feature, size:
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(127): Reading mixture gaussian parameter: /usr/local/share/pocketsphinx/model/en-us/en-us/variances
INFO: ms_gauden.c(242): 42 codebook, 3 feature, size:
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(304): 222 variance values floored
INFO: ptm_mgau.c(475): Loading senones from dump file /usr/local/share/pocketsphinx/model/en-us/en-us/sendump
INFO: ptm_mgau.c(499): BEGIN FILE FORMAT DESCRIPTION
INFO: ptm_mgau.c(562): Rows: 128, Columns: 5126
INFO: ptm_mgau.c(594): Using memory-mapped I/O for senones
INFO: ptm_mgau.c(837): Maximum top-N: 4
INFO: phone_loop_search.c(114): State beam -225 Phone exit beam -225 Insertion penalty 0
ERROR: "dict.c", line 275: Failed to open dictionary file 'modules/MMM-voice/MMM-voice.dic' for reading: No such file or directory

Originally posted by @nosee818 in #32 (comment)

Recognize more then one Language.

Platform (Hardware/OS): Linux/Raspberry Pi

Description of the issue: Please, add the possibility to recognize more then one Language, or an HowTo.

ERROR: "dict.c"

Platform (Hardware/OS): Raspberry Pi 3

Node version: v9.11.2

MagicMirror version: newest

Module version: newest

Description of the issue: Hey guys, after installing the module I had an Error 127 with the library problem that was already discussed. After spending the last two days ( I´m an absolute beginner) I "fixed" it. Now It says "1" in the error.log and the following in the debug.log:

debug log of error

hope you can help me.

No Action on saying the Commands

Platform (Hardware/OS):

Node version:

MagicMirror version:

Module version:

Description of the issue:
When i say the keyword the mic starts blinking but when i say the command there isn't any action.

Error 1

Platform (Hardware/OS):Raspbian

Node version:

MagicMirror version:latest

Module version:latest

Description of the issue: i hv tired so many things which you have told to troubleshoot those problems but it didnt work for me
it shows error 1 in error log
and shows error in magic mirror too

"Initialising"

Platform (Hardware/OS): Raspberry Pi3
MagicMirror version: 2.1.3
Module version: 1.0.2.

Hey,
first of all many thanks for the awesome module!
I installed everything according to the readme but when I start Magic Mirror it’s displaying “Initialising…” and the mic icon has a slash through it and is blinking infinitely.
I'm using a standard usb-mic and I've already checked for the correct ID.
Using the latest MM-version and updated.

Maybe someone can help? Many thanks in advance :)

Adding Param?

With the current model, how would we add params to commands? For instance if I wanted to see the weather in a certain city. I can figure out the work on the API side, but chaining the command is something I am not too sure about. Any thoughts?

Error opening audio device for capture: Connection refused

Platform (Hardware/OS): Raspbian GNU/Linux 12 (bookworm)
Raspberry Pi 3 Model A+
Single Board Computer 1.4GHz 4 Core 512MB RAM Broadcom BCM2837 ARM Cortex-A53

Node version: Node.js v20.9.0

MagicMirror version: 2.28.0

Module version: v1.0.2

Description of the issue:

I see ERROR next to the microphone. I used debug:true and
The debug log shows

'Error opening audio device plughw:2 for capture: Connection refused
FATAL: "continuous.c", line 245: Failed to open audio device'

when I type 'cat /proc/asound/cards'

I get this:

0 [vc4hdmi        ]: vc4-hdmi - vc4-hdmi
                      vc4-hdmi
 1 [Headphones     ]: bcm2835_headpho - bcm2835 Headphones
                      bcm2835 Headphones
 2 [Device         ]: USB-Audio - USB PnP Sound Device
                      C-Media Electronics Inc. USB PnP Sound Device at usb-3f980

I want to use 0 [vc4hdmi ]: vc4-hdmi - vc4-hdmi for playback and 2 [Device ]: USB-Audio - USB PnP Sound Device for capture.

When I run arecord --format cd --duration 15 --channels 1 -D plughw:2,0 test.wav
I can record and when I do aplay test.wav I hear the recording

Adding other voice controls directly into the module

Platform (Hardware/OS): RPi3 - Raspian Stretch

Node version: 8.9.3

MagicMirror version: 2

Module version: Latest

Description of the issue:

as the title said i want to add other voice commands into the module itself (not integrating other modules with voice command) is their any way the codes can be altered and what file to edit exactly, im still new to this and i want to know if its possible thanks :)

Undefined Microphone Error

Microphone Error
Platform (Hardware/OS):
Raspberry Pi 3 Model B Rev 1.2
Raspbian Stretch
Linux raspberrypi 5.4.51-v7+ #1333 SMP Mon Aug 10 16:45:19 BST 2020 armv7l GNU/Linux

Node version:
v10.23.3

MagicMirror version:
MagicMirror: v2.14.0

Module version:
1.0.2

Description of the issue:
After Installing a fresh Raspberry Pi with a fresh Magic Mirror and all the dependencies for this module, I cannot get it to work.
I configured only these modules:
alert, clock, MMM-voice
After starting the Magic Mirror and opening the URL, it only shows "ERROR" in the lower section. Find my config attached
config.js.txt
(I renamed the config to config.js.txt as I couldn't upload it as config.js)

My Audio Hardware
I'm using the "ReSpeaker 2-Mics Pi HAT" Module for Microphone. I installed everything from https://wiki.seeedstudio.com/ReSpeaker_2_Mics_Pi_HAT/ and I can successfully hear myself, when I try "arecord -f cd -Dhw:2 | aplay -Dhw:2"
The config also contains "microphone: 2".

I wasn't able to debug some information (because the Chrome Developer Tools didn't gave me any hint and I have no idea how to enable debugging for "npm run start" or "npm run server"

Any idea, what's going wrong here?

Background is only white

I applied to MMM-voice and MMM-tts on my MagicMirror2.
But after 'npm start', background color was only white.
I tried 'magic mirror' and 'wake up' command. But it did not change.
What should I do??

Mode selection

I'm sorry I post this as an issue but I don't see another way to contact you.
I am trying to find a way to bypass the mode selection phase and just straight to VOICE mode.
I would be really thankful if you could point me in the right direction.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.