• 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 / MMM-Hotword Issue

Scheduled Pinned Locked Moved Unsolved Troubleshooting
28 Posts 3 Posters 8.8k Views 3 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.
  • B Offline
    BJ Duncan
    last edited by Jun 30, 2019, 8:41 PM

    No dramas at all.

    Now you need to double check that you are pointing to the correct device number for your audio with the Assistant module.
    In a terminal at the root directory (pi@raspberrypi:~ ) Check the device list for audio input:

    arecord -l
    

    This should provide you a list of CAPTURE Hardware Devices. The numbers you want to write down is the Card number, and device number.
    As an example on my device I have it as Card: 2 Device: 0

    Now within the config.js of the MagicMirror ensure that the device number is the same. Here is what it looks like within my config.js:

    {
    		  module: "MMM-AssistantMk2",
    		  position: "bottom_bar",
    		  config: {
    		    record: {
    		      recordProgram : "arecord",  
    		      device        : "plughw:2",
    		    },
    		
    		    notifications: {
    		      ASSISTANT_ACTIVATED: "HOTWORD_PAUSE",
    		      ASSISTANT_DEACTIVATED: "HOTWORD_RESUME",
    		    },
    		  }
    		},
    		{
    		  module: "MMM-Hotword",
    		  config: {
    		    chimeOnFinish:null,
    		    mic: {
    		      recordProgram : "arecord",  
    		      device        : "plughw:2",
    		    },
    		    models: [
    		      {
    		        hotwords    : "smart_mirror",
    		        file        : "smart_mirror.umdl",
    		        sensitivity : "0.5",
    		      },
    		    ],
    		    defaultCommand: {
    		      notificationExec: {
    		        notification: "ASSISTANT_ACTIVATE",
    		        payload: (detected, afterRecord) => {
    		          return {profile:"default"}
    		        }
    		      },
    		      afterRecordLimit:0,
    		      restart:false,
    		    },
    		  },
    },
    

    Notice within both my modules because my card number is ‘2’, that the

    device : "plughw:2",
    

    So make sure your number corresponds with your Card number.

    Give that a test and we will go from there.

    Regards,
    BJ Duncan

    J 1 Reply Last reply Jul 1, 2019, 12:54 PM Reply Quote 0
    • J Offline
      JonoGee @BJ Duncan
      last edited by Jul 1, 2019, 12:54 PM

      @BJ-Duncan said in MMM-AssistantMk2 / MMM-Hotword Issue:

      arecord -l

      I get this…

      pi@raspberrypi:~ $ arecord -l
      **** List of CAPTURE Hardware Devices ****
      card 0: sndrpigooglevoi [snd_rpi_googlevoicehat_soundcar], device 0: Google voiceHAT SoundCard HiFi voicehat-codec-0 []
        Subdevices: 1/1
        Subdevice #0: subdevice #0
      pi@raspberrypi:~ $ 
      
      
      J 1 Reply Last reply Jul 1, 2019, 12:59 PM Reply Quote 0
      • J Offline
        JonoGee @JonoGee
        last edited by Jul 1, 2019, 12:59 PM

        @JonoGee I recognised both devices as 0 so I changed accordingly. Now i get this error message. Mirror opens but closes immediately…

        [MMM-PushBulletNotifications][Info] 13:58:15.164 - PushBullet connected
        [HOTWORD] begins.
        [HOTWORD] Detector starts listening.
        /home/pi/MagicMirror/node_modules/electron/dist/electron js/electron.js: symbol lookup error: /home/pi/MagicMirror/modules/MMM-Hotword/snowboy/lib/node/binding/Release/electron-v3.0-linux-arm/snowboy.node: undefined symbol: cblas_sdot
        npm ERR! file sh
        npm ERR! code ELIFECYCLE
        npm ERR! errno ENOENT
        npm ERR! syscall spawn
        npm ERR! magicmirror@2.7.1 start: `sh run-start.sh`
        npm ERR! spawn ENOENT
        npm ERR! 
        npm ERR! Failed at the magicmirror@2.7.1 start script.
        npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
        
        npm ERR! A complete log of this run can be found in:
        npm ERR!     /home/pi/.npm/_logs/2019-07-01T12_58_15_977Z-debug.log
        pi@raspberrypi:~/MagicMirror $ 
        
        
        J 1 Reply Last reply Jul 1, 2019, 1:04 PM Reply Quote 0
        • J Offline
          JonoGee @JonoGee
          last edited by Jul 1, 2019, 1:04 PM

          @JonoGee If devices are set as…

          hw:0,0
          

          The mirror works, but Assistant/Hotword doesm’t. I just changed to …```
          plughw:0

          and it crashes
          1 Reply Last reply Reply Quote 0
          • B Offline
            BJ Duncan
            last edited by BJ Duncan Jul 2, 2019, 2:15 AM Jul 2, 2019, 2:14 AM

            What type of microphone is it? Is it USB?
            Also, what version of Raspbian are you using? And is it Raspberry Pi 3+ ?

            Regards,
            BJ Duncan

            J 1 Reply Last reply Jul 2, 2019, 9:46 AM Reply Quote 0
            • J Offline
              JonoGee @BJ Duncan
              last edited by Jul 2, 2019, 9:46 AM

              @BJ-Duncan
              The Mic is a combined Speaker / Mic HAT as see here… https://www.raspiaudio.com/raspiaudio-aiy

              I am running Raspberry Pi3+
              Version…

              pi@raspberrypi:~ $ lsb_release -a
              No LSB modules are available.
              Distributor ID:	Raspbian
              Description:	Raspbian GNU/Linux 9.9 (stretch)
              Release:	9.9
              Codename:	stretch
              pi@raspberrypi:~ $ 
              
              
              1 Reply Last reply Reply Quote 0
              • B Offline
                BJ Duncan
                last edited by Jul 2, 2019, 9:53 AM

                Sorry @JonoGee mate, I may not be the best person to resolve as I have USB Mic so my settings will be different to yours.

                I will attempt to do some research for you though and see if I can assist with a solution.

                Regards,
                BJ Duncan

                J 2 Replies Last reply Jul 2, 2019, 1:28 PM Reply Quote 0
                • J Offline
                  JonoGee @BJ Duncan
                  last edited by Jul 2, 2019, 1:28 PM

                  @BJ-Duncan
                  I realise both Speaker & Mic are on same Hat but does it make sense to you that the ID for aplay and arecord are exactly the same. Code included below…

                  pi@raspberrypi:~ $ aplay -l
                  **** List of PLAYBACK Hardware Devices ****
                  card 0: sndrpigooglevoi [snd_rpi_googlevoicehat_soundcar], device 0: Google voiceHAT SoundCard HiFi voicehat-codec-0 []
                    Subdevices: 1/1
                    Subdevice #0: subdevice #0
                  pi@raspberrypi:~ $ arecord -l
                  **** List of CAPTURE Hardware Devices ****
                  card 0: sndrpigooglevoi [snd_rpi_googlevoicehat_soundcar], device 0: Google voiceHAT SoundCard HiFi voicehat-codec-0 []
                    Subdevices: 1/1
                    Subdevice #0: subdevice #0
                  pi@raspberrypi:~ $ 
                  
                  
                  J 1 Reply Last reply Jul 2, 2019, 1:30 PM Reply Quote 0
                  • J Offline
                    JonoGee @JonoGee
                    last edited by Jul 2, 2019, 1:30 PM

                    @JonoGee I mean I supposedly I have to set both IDs in config file to hw:0,0.

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      JonoGee @BJ Duncan
                      last edited by Jul 5, 2019, 10:59 AM

                      @BJ-Duncan What Mic do you use mate? I might just buy same one.lol

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 3 / 3
                      3 / 3
                      • First post
                        22/28
                        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