Read the statement by Michael Teeuw here.
Yet Another Voice Module (Sphinx + Alexa)
-
Hi,
I’m having a problem installing this module and maybe someone could help me, because this is my first experience with Linux and the Magic Mirror.
I followed the link describe in the Github to install Alexa. It was everything ok, I talked to her at the end.
I followed the rest of the instructions to install the module, although when I start the Magic Mirror it keeps at “loading” and after a while the application crash.
The last message is:
Listening for transport dt_socket at address: 5005
electron js/electron.js: …/src/java.cpp:105: v8::Localv8::Value Java::ensureJvm(): Assertion `result->IsNull()’ failed.How can I solve it?
Thanks in advance.
-
@clumsy_ninja said in Yet Another Voice Module (Sphinx + Alexa):
@whyjustin Is it possible to change the activation work in your alexa? I remember seeing it defined in json somewhere but does it require voice training or something?
commands: { "mirror mirror": { action: 'alexa' } },
If you edit the above you can adjust the activation of Alexa. Haven’t spent much time with this project recently but IIRC you have to remove
sphinx-model-generator/commands.dic
andsphinx-model-generator/commands.lm
when changing the commands. -
@lb-rezende said in Yet Another Voice Module (Sphinx + Alexa):
electron js/electron.js: …/src/java.cpp:105: v8::Localv8::Value Java::ensureJvm(): Assertion `result->IsNull()’ failed.
If I were to hazard a guess the JDK isn’t installed on your machine although you previously said that you were able to verify Alexa was working. Wild guess would be to verify the steps in [0] were followed to downgrade the electron client although this may not be related.
[0] https://github.com/whyjustin/magic-mirror-voice#installation-notes
-
I had done that step when I installed. I checked again, and Alexa is working when I execute the last step of the installation process (the one that has to open three different terminals and then the Alexa opens).
As I said, I’m new with Linux, so probably I configured it with something missing or wrong. My config.js is this way:
{ module: 'magic-mirror-voice', header: 'Magic Mirror Voice', position: 'top_right', config: { debug: true, alexa: { productId: 'MagicMirrorEmmanuel', dsn: 'MagicMirrorEmmanuel' }, ssl: { sslCaCert: './magic-mirror-voice/alexa-certificate-generator/certs/ca/ca.crt', sslKey: './magic-mirror-voice/alexa-certificate-generator/certs/server/node.key', sslCert: './magic-mirror-voice/alexa-certificate-generator/certs/server/node.crt', sslClientKeyStore: './magic-mirror-voice/alexa-certificate-generator/certs/client/client.pkcs12', sslClientKeyStorePassphrase: '' }, companion: { port: 3000, serviceUrl: 'https://localhost:3000', redirectUrl: 'https://localhost:3000/authresponse', clientId: 'MY PRIVATE CLIENT ID', clientSecret: 'MY PRIVATE CLIENT SECRET' }, client: { alpnVersion: '1.0.2', vlcPath: '/usr/lib/vlc', vlcPluginPath: '/usr/lib/vlc/plugins' }, sphinx: { commands: { "mirror mirror": { action: 'alexa' } }, dictionary: './commands.dic', // Optional model: './commands.lm' // Optional } } },
I’m not sure about the alpnVersion, vlcPath and vlcPluginPath, because I do not know where and how to find it. The dsn line as well, where do I find it?
I already changed ports as discussed here before, but did not work.Thanks!
-
@lb-rezende said in Yet Another Voice Module (Sphinx + Alexa):
I’m not sure about the alpnVersion,
Verify your java version by running
java -version
then you should be able to look up the ALPN here. Your version looks incorrect so maybe this is your issue.vlcPath and vlcPluginPath,
Check the docs here, but it should boil down to running
whereis vlc
. The values you provided look correct for a default setup.because I do not know where and how to find it. The dsn line as well, where do I find it?
I don’t think you need to worry about this. It’s part of the automated cert generation and the communication between the OAuth NodeJS server and the Alexa Java application. IIRC this can be any value.
-
@whyjustin said in Yet Another Voice Module (Sphinx + Alexa):
commands: { "mirror mirror": { action: 'alexa' } },
If you edit the above you can adjust the activation of Alexa. Haven’t spent much time with this project recently but IIRC you have to remove sphinx-model-generator/commands.dic and sphinx-model-generator/commands.lm when changing the commands
@whyjustin Yeah thats it. Do i need to record a new training file to replace those or where did the original one come from?
-
I followed this doc that you linked and it has more details than the original readme file that I used, when I used the automated installation. The problem now is that Maven is no longer working. I receive the following message:
-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.
Any idea how to solve it?
-
@clumsy_ninja said in Yet Another Voice Module (Sphinx + Alexa):
@whyjustin Yeah thats it. Do i need to record a new training file to replace those or where did the original one come from?
The plugin will automatically generate your models and dictionary on startup using the JSON property names (e.g. “mirror mirror”) if the sphinx-model-generator/commands.dic and sphinx-model-generator/commands.lm are missing. So remove those files, adjust the JSON, then start the plugin again. You can also manually edit the commands.lm and commands.dic files after they are automatically generated if you are comfortable with language modeling.
-
@lb-rezende said in Yet Another Voice Module (Sphinx + Alexa):
-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.
I would verify your Maven installation. Is $M2_HOME set? If so you can
-Dmaven.multiModuleProjectDirectory=$M2_HOME
although this should be the default behavior. -
@whyjustin said in Yet Another Voice Module (Sphinx + Alexa):
-Dmaven.multiModuleProjectDirectory=$M2_HOME
Where do I set the $M2_HOME (and how)? I just created the maven.sh file as described in the tutorial and included the two lines. I inserted this line that you suggested in the same file, maven.sh, but did not work.
Is there a way to uninstall those applications and do all over again?