MagicMirror² v2.14.0 is available! For more information about this release, check out this topic.

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

  • 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

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

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

  • @martinhood no idea on virtualizing

    second mic… maybe. haven’t tried that myself

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

  • 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

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

  • 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

Log in to reply