• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

MMM-AssistantMk2 with Google AIY

Scheduled Pinned Locked Moved Unsolved Troubleshooting
16 Posts 4 Posters 2.8k Views 4 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
    last edited by A Former User Feb 18, 2020, 7:27 PM Feb 18, 2020, 7:27 PM

    ok , i wait

    give me all log plz

    and give me your config.js file

    1 Reply Last reply Reply Quote 0
    • N Offline
      nakedrabbit
      last edited by nakedrabbit Feb 18, 2020, 8:15 PM Feb 18, 2020, 8:14 PM

      logs from pm2:

      0|mm | [AMK2] MMM-AssistantMk2 Version: 3.1.0-3
      0|mm | [AMK2] AssistantMk2 is initialized.
      0|mm | [HOTWORD] begins.
      0|mm | [HOTWORD] Detector starts listening.
      0|mm | [HOTWORD] Detected: SMARTMIRROR
      0|mm | [HOTWORD] After Recording: 4000
      0|mm | [HOTWORD] After Recording: 4000
      0|mm | [HOTWORD] After Recording: 4000
      0|mm | [HOTWORD] After Recording: 4000
      0|mm | [HOTWORD] stops.
      0|mm | [HOTWORD] After Recording finised. size: 16050
      0|mm | [HOTWORD:B2W] WAV_FILE_CREATED: /home/pi/MagicMirror/modules/MMM-Hotword/temp/afterRecording.wav 16050
      0|mm | [HOTWORD] Final Result: { detected: true,
      0|mm | hotword: ‘SMARTMIRROR’,
      0|mm | file: ‘temp/afterRecording.wav’ }

      It is true, Hotword records a 16K file that seems to only include noise. It does recognize and pass me to AssistantMk2, but immediately says “I don’t understand” and then cannot be invoked again.

      The file “temp/afterRecording.wav” exists, but it is a 0K file.

      Config for MM sections are here:

      {
      module: “MMM-AssistantMk2”,
      position: “top_left”,
      config: {
      assistantConfig: {
      latitude: 51.508530,
      longitude: -0.076132,
      playProgram: “mpg321”,
      },
      responseConfig: {
      useHTML5: false,
      },
      micConfig: { // put there configuration generated by auto-installer
      recorder: “arecord”,
      device: “plughw:0”,
      },
      }
      },
      {
      module: “MMM-Hotword”,
      position: “bottom_left”,
      config: {
      useDisplay: false,
      chimeOnFinish: null,
      recipes: [“with-AMk2v3_smart-mirror.js”],
      mic: {
      recordProgram: “arecord”,
      device: “plughw:0”,
      },
      },
      },

      Forum does not allow uploading the .js file, if you need the whole thing lemme know and I’ll put it up somewhere else.

      S 1 Reply Last reply Feb 18, 2020, 8:26 PM Reply Quote 0
      • ? Offline
        A Former User
        last edited by A Former User Feb 18, 2020, 8:43 PM Feb 18, 2020, 8:20 PM

         {
          module: "MMM-Hotword",
          position: "bottom_left",
          config: {
            useDisplay: false,
            chimeOnFinish: null,
            recipes: ["with-AMk2v3-noisy_smart-mirror.js"],
            mic: {
              recordProgram: "arecord",
              device: "plughw:0",
            },
          },
        },
        

        can you retry with this MMM-Hotword configuration ?

        edit 1: sorry, correct mismake

        edit 2:

        humm there is some mismake in your AMk2 config
        i propose this AMk2 config :

        {
          module: "MMM-AssistantMk2",
          position: "top_left",
          config: {
            debug: true,
            ui: "Fullscreen",
            assistantConfig: {
              latitude: 51.508530,
              longitude: -0.076132,
            },
            responseConfig: {
              useHTML5: false,
              playProgram: "mpg321",
              useStaticIcons: false,
            },
            micConfig: {
              recorder: "arecord",
              device: "plughw:0",
            },
            recipes: [ "with-MMM-Hotword.js" ]
            profiles: {
             "default": {
                profileFile: "default.json",
                lang: "en-US"
              }
            },
            addons: false,
          }
        }
        
        N 1 Reply Last reply Feb 19, 2020, 5:43 AM Reply Quote 0
        • S Offline
          sdetweil @nakedrabbit
          last edited by Feb 18, 2020, 8:26 PM

          @nakedrabbit please use the code marker for all config entry data u might post…

          paste the text,
          then mark it, and hit the </> button above the edit box

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • N Offline
            nakedrabbit @Guest
            last edited by nakedrabbit Feb 19, 2020, 5:44 AM Feb 19, 2020, 5:43 AM

            @Bugsounet YOU ARE A MAGIC MAN.

            And @sdetweil , you are quite right about my forum incompetence. For the record I will try to do better right now.

            Bugs, there were some commas missing that threw me off for a while, but this is the config that worked/ I encourage @Croeder to check this out, since I am also using the Google Hat.

            {
              			module: "MMM-AssistantMk2",
              			position: "top_left",
              			config: {
                			debug: true,
                			ui: "Fullscreen",
                			assistantConfig: {
                  				latitude: 51.508530,
                  				longitude: -0.076132,
                				},
                			responseConfig: {
                  				useHTML5: false,
                  				playProgram: "mpg321",
                  				useStaticIcons: false,
                				},
                			micConfig: {
                  				recorder: "arecord",
                  				device: "plughw:0",
                				},
                			recipes: [ "with-MMM-Hotword.js" ],
                			profiles: {
                 				"default": {
                    				profileFile: "default.json",
                    				lang: "en-US",
                  					},
                				},
                			addons: false,
              				}
            			},
            
            1 Reply Last reply Reply Quote 0
            • ? Offline
              A Former User
              last edited by Feb 19, 2020, 7:22 AM

              I think, it’s works now :)

              • Your default location is defined by this block:
                  assistantConfig: {
                    latitude: 51.508530,
                    longitude: -0.076132,
                  },
              

              change latitude and longitude value for your actual position
              This website can help you to determinate it

              • For language change:

              change the value lang: "en-US", (actually in english) in

                profiles: {
                  "default": {
                    profileFile: "default.json",
                    lang: "en-US",
                  },
                },
              

              Change the lang value by your own.
              You can determinate it there

              Notes:

              • I’m not a magician, just a hobbyist programmer of this module ;)
              • Read wiki for advanced config
              1 Reply Last reply Reply Quote 0
              • 1
              • 2
              • 2 / 2
              2 / 2
              • First post
                15/16
                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