MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Need help for testing modules

    Scheduled Pinned Locked Moved Development
    14 Posts 5 Posters 6.2k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? Offline
      A Former User @TheOmran
      last edited by

      @TheOmran thanks. Maybe i missed something in manual. I’ll check and add your result to wiki. Thanks again.

      1 Reply Last reply Reply Quote 0
      • C Offline
        cxlwill
        last edited by

        I just starred your plugin while wandering at Github and go back to find the post at forum. I’m so excited that this plugin actually published with high level of completeness. You did a wonderful job!

        ? 1 Reply Last reply Reply Quote 0
        • ? Offline
          A Former User @cxlwill
          last edited by

          @cxlwill Thanks for your words. I hope I could find some nice East Asian Alternatives.

          1 Reply Last reply Reply Quote 0
          • T Offline
            Txukie
            last edited by

            I have been trying to make this work for a couple of days but I don’t seem to be able to achieve this. I have installed it correctly and add it to my screen, it does detect when I say “snowboy” but then it fails miserably.
            This is the error it throws:

            0|mm       | [ASSTNT] Conversation Error: Service unavailable.
            0|mm       | Recording 16384 bytes
            0|mm       | Recording 16384 bytes
            0|mm       | [ASSTNT] Conversation Error: { Error: Unknown Error.
            0|mm       |     at ClientDuplexStream._emitStatusIfDone (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/node_modules/grpc/src/node/src/client.js:201:19)
            0|mm       |     at ClientDuplexStream._receiveStatus (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/node_modules/grpc/src/node/src/client.js:180:8)
            0|mm       |     at /home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/node_modules/grpc/src/node/src/client.js:649:14
            0|mm       |   code: 2,
            0|mm       |   metadata: Metadata { _internal_repr: { 'content-disposition': [Object] } } }
            
            

            This is the configuration file

            {
                              module: 'MMM-Assistant',
                              position: 'bottom_left',
                              config: {
                                assistant: {
                                  auth: {
                                    keyFilePath: "secret.json", //When you want to change the location of this file, set this.
                                    savedTokensPath: "resources/tokens.js" //When you want to change the location of this file, set this.
                                  },
                                  audio: {
                                    encodingIn: "LINEAR16", //Ignore this. I think you don't need to change this.
                                    sampleRateOut: 16000 //Ignore this. I think you don't need to change this.
                                  }
                                },
                                snowboy: {
                                  models: [
                                    {
                                      file: "resources/smart_mirror.pmdl",
                                      sensitivity: 0.5,
                                      hotwords : "MIRROR" //One of models should be "MIRROR"
                                    },
                                    {
                                      file: "resources/snowboy.umdl",
                                      sensitivity: 0.5,
                                      hotwords : "ASSISTANT" //One of models should be "ASSISTANT"
                                    }
                                  ]
                                },
                                record: {
                                  threshold: 0, //Ignore this. I think you don't need to change this.
                                  verbose:true, //true for checking recording status.
                                  recordProgram: 'rec', //You can use 'rec', 'sox'. But I recommend use 'arecord'.
                                  silence: 2.0 //Ignore this. I think you don't need to change this.
                                },
                                stt: {
                                  auth: [{
                                    projectId: 'magicmirror-gassistant', //ProjectId from Google Console
                                    keyFilename: 'keyfile.json'
                                  }], //You can use multi accounts for saving money.
                                  request: {
                                    encoding: 'LINEAR16', //Ignore this. I think you don't need to change this.
                                    sampleRateHertz: 16000, //Ignore this. I think you don't need to change this.
                                    languageCode: 'en-US' //See https://cloud.google.com/speech/docs/languages
                                  },
                                },
                                speak: {
                                  useAlert: true, //If you want to show the text of speech, set this true. But It could be ignored by command of modules directly.
                                  language: 'en-US', //If you want to set the default language of speech of command result, set this.
                                },
                                alias: [
                                  {
                                    "help :command" : ["teach me :command", "what is :command"]
                                  }
                                ] // You can use aliases for difficult pronunciation or easy using.
                              }
                            }
            
            

            Any help with this would be greatly appreciated

            ? 1 Reply Last reply Reply Quote 0
            • ? Offline
              A Former User @Txukie
              last edited by

              @Txukie
              Have you tried changing recordProgram to arecord?

              1 Reply Last reply Reply Quote 0
              • T Offline
                Txukie
                last edited by

                I have, it fails with another error:

                [ASSTNT] Assistant Activated
                Recording with sample rate 16000...
                Recording 4000 bytes
                End Recording: 431.071ms
                Recording 12044 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                Recording 4000 bytes
                (node:10777) Warning: No such label 'End Recording' for console.timeEnd()
                [ASSTNT] Conversation Error: { Error: Received RST_STREAM with error code 0
                    at ClientDuplexStream._emitStatusIfDone (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/node_modules/grpc/src/node/src/client.js:201:19)
                    at ClientDuplexStream._receiveStatus (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/node_modules/grpc/src/node/src/client.js:180:8)
                    at /home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/node_modules/grpc/src/node/src/client.js:649:14 code: 13, metadata: Metadata { _internal_repr: {} } }
                
                
                ? 1 Reply Last reply Reply Quote 0
                • ? Offline
                  A Former User @Txukie
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • ? Offline
                    A Former User
                    last edited by

                    I’ll try to research it tomorrow. I wish good luck to both of you and me.

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      Txukie
                      last edited by

                      Ok, it does seem that my microphone is indeeed crap. I have managed to make it work by tinkling a little bit but it’s very unstable, seems to stop recording after a while for no apparent reason.
                      Also, when I try to change the language to es-ES it does not work at all, and I’m not sure why.

                      ? 1 Reply Last reply Reply Quote 0
                      • ? Offline
                        A Former User @Txukie
                        last edited by

                        @Txukie as i know google assistant doesn’t support spanish yet(at least, in current grpc api). In configuration, spanish is available in ‘recognition on command mode’ and ‘speech response of command mode’, not ‘google assistant mode’.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy