• 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.

Can MMM-GoogleAssistant and MMM-awesome-alexa run together?

Scheduled Pinned Locked Moved Troubleshooting
8 Posts 2 Posters 932 Views 2 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.
  • M Offline
    martinhood
    last edited by Jan 9, 2021, 4:41 PM

    Hello,
    I’m a MagicMirror newby, I started building my setup last week, and I’m having fun doing it.
    I manged to install and configure both GA and Alexa module (not without a little struggle for the latter), and they both run smoothly individually.
    Now I would like to have both of them running together but, for some reason, when activated together, only Alexa activates on its wakeword, while GA does not.

    Does anyone have any hint about this (or maybe know reasons why they just can’t run together) ?
    My first thought was about 2 snowboy instances running together and disturbing each other, maybe I should collect some logs about that, but I’m still not sure about how to do that (maybe start MM in dev mode?)

    I run my MM instance in a Debian Buster virtual machine.

    Thank you in advance

    S 1 Reply Last reply Jan 9, 2021, 4:43 PM Reply Quote 0
    • S Offline
      sdetweil @martinhood
      last edited by sdetweil Jan 9, 2021, 4:44 PM Jan 9, 2021, 4:43 PM

      @martinhood have to pick 1. there is no microphone sharing. whoever gets the mic 1st wins

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • M Offline
        martinhood
        last edited by Jan 9, 2021, 4:51 PM

        Thanks for your feedback.
        That actually does make sense.
        What about “virtualizing” mic layer with ALSA? (I read something about “aliasing” hd devices, if I’m not wrong).
        Otherwise, could adding a second hw mic solve the problem in your opinion?

        Thank you,
        Daniele

        S 1 Reply Last reply Jan 9, 2021, 4:53 PM Reply Quote 0
        • S Offline
          sdetweil @martinhood
          last edited by Jan 9, 2021, 4:53 PM

          @martinhood no idea on virtualizing

          second mic… maybe. haven’t tried that myself

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • M Offline
            martinhood
            last edited by Jan 9, 2021, 5:00 PM

            I’ll try and let you know. Thank you!

            1 Reply Last reply Reply Quote 0
            • M Offline
              martinhood
              last edited by Jan 10, 2021, 2:17 PM

              I finally managed to make it work. Actually it was easier than I thought.
              The problem was in my initial MMM-GoogleAssistant configuration.
              I try to give some details.

              Background: As far as I understood there are multiple layers in Linux audio. Put very raw: PulseAudio is frontend, sitting on ALSA that controls underlying hardware (so PA -> ALSA -> OS -> HW).
              PulseAudio’s job is exactly to take care and manage multpiple audio flows at a higher locigal level, so it IS capable of managing multiple applications accessing same in/out channels

              MMM-awesome-alexa uses SOX by default, and there is no (easy) way to configure it. SOX uses PulseAudio by default (which is OK)

              MMM-Google Assistant can be configured to use SOX (so PulseAudio) OR ALSA directly.

              I initially had my GA configured to use ALSA, like that:
              micConfig: { // put there configuration generated by auto-installer
              recorder: “arecord”,
              device: “plughw:0”,
              },

              This is OK for standalone, but binding directly to ALSA makes PulseAudio unable to manage multiple access to the mic (by Alexa, for example)

              It was enough to configure GA to use SOX (which is actually the default, for a reason):
              micConfig: { // put there configuration generated by auto-installer
              },
              This way both GA and Alexa go through PulseAudio, which is capable to make them work together.

              I hope my poor English was enough to make it clear.

              PS: I am unaware if PulseAudio layer is available on Raspberry OS, I am using Debian Buster on x86 VM where it is installed and available by default

              S 1 Reply Last reply Jan 10, 2021, 2:41 PM Reply Quote 0
              • S Offline
                sdetweil @martinhood
                last edited by Jan 10, 2021, 2:41 PM

                @martinhood I have no idea how u got both wave recorders running at the same time

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • M Offline
                  martinhood
                  last edited by martinhood Jan 10, 2021, 3:38 PM Jan 10, 2021, 3:37 PM

                  I did literally nothing but remove any value from “micConfig:” section in MMM-GoogleAssistant.

                  But now that you make me double check, I saw that this does not defaults the recorder to “sox”. It actually defaults to “arecord” again.

                  Then actually, the working step is removing directive
                  device: “plughw:0”

                  It somehow prevents GA to try going directly “under” PulseAudio, and makes it use the PulseAusio ALSA plugin instead.
                  Once both goes through PulseAudio, they can work together, as PulseAudio cam make multiple wave recorders work by default

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