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 964 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.
    • S Offline
      sdetweil @martinhood
      last edited by

      @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

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

        1 Reply Last reply Reply Quote 0
        • M Offline
          martinhood
          last edited by

          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 Reply Quote 0
          • S Offline
            sdetweil @martinhood
            last edited by

            @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

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