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.

    How do I get the Google AIY Voice HAT installed so that MMM can use it?

    Scheduled Pinned Locked Moved Hardware
    16 Posts 3 Posters 4.9k 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.
    • F Offline
      fribse
      last edited by

      Hi All

      I’m just starting out with Magic Mirror. I’ve gotten hold of a monitor that I’ve stripped, and I also have a RPi 3+ that I’ve installed with Raspbian Stretch and Magic Mirror, and it has started up in the basic form.
      I’ve found the MMM-AssistantMk2 for integration of Google Assistant.
      I have a Google AIY voice hat that I would like to use for input and output, but how do I set that up?
      But how do I install that on the raspbian?

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @fribse
        last edited by

        @fribse why do you want two google interfaces at the same time?

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        F 1 Reply Last reply Reply Quote 0
        • F Offline
          fribse @sdetweil
          last edited by

          @sdetweil I don’t want two interfaces, I just want to use the Google Voice HAT, and I can’t seem to find an explanation of how to install and use the HAT with the MMM-AssistantMK2

          S ? 2 Replies Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @fribse
            last edited by

            @fribse thats because MMM-AssistantMk2 doesn’t/won’t use the HAT.

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            F 1 Reply Last reply Reply Quote 0
            • ? Offline
              A Former User @fribse
              last edited by

              @fribse
              The hardware (HAT) itself could be used for MMM-AssistantMk2, if you have a proper ALSA setup.

              F 1 Reply Last reply Reply Quote 1
              • F Offline
                fribse @sdetweil
                last edited by

                @sdetweil Ok, I see, I just thought of the Voice HAT as a piece of hardware, that should work with everythng :-)

                S ? 2 Replies Last reply Reply Quote 0
                • S Do not disturb
                  sdetweil @fribse
                  last edited by

                  @fribse @Sean will know, he is the MMM-AssistantMk2 author

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 1
                  • ? Offline
                    A Former User @fribse
                    last edited by A Former User

                    @fribse
                    Under this condition, you can use it as Mic/Speaker for MMM-AssistantMk2

                    1. you should be able to record your voice through HAT mic with arecord -d [PROPER_DEVICE] in terminal. Find or set [PROPER_DEVICE].
                    2. HAT should be default sound output device, so you should be able to play some mp3/wav file with mpg321 in terminal.
                      2-1) If HAT is not the default device, you should find or set proper device name/id for HAT speaker out. It should be different with Mic.
                    1 Reply Last reply Reply Quote 1
                    • F Offline
                      fribse @Guest
                      last edited by

                      @Sean Hi Sean, sorry I didn’t see your post, ok, so I’ll install the ALSA, I guess I can figure that part out, thankyou for chiming in!

                      ? 1 Reply Last reply Reply Quote 0
                      • ? Offline
                        A Former User @fribse
                        last edited by

                        @fribse
                        ALSA is default audio framework of Raspbian OS.(of some version of Debina/Ubuntu linux and others also…). You just need to find/set proper setup.

                        You can check the information of your audio devices with these commands;

                        arecord -l : for Mic devices;
                        aplay -l : for Speaker devices;

                        Those commands will show something similar this;

                        $ aplay -l
                        **** List of PLAYBACK Hardware Devices ****
                        card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
                          Subdevices: 8/8
                          Subdevice #0: subdevice #0
                          Subdevice #1: subdevice #1
                          Subdevice #2: subdevice #2
                          Subdevice #3: subdevice #3
                          Subdevice #4: subdevice #4
                          Subdevice #5: subdevice #5
                          Subdevice #6: subdevice #6
                          Subdevice #7: subdevice #7
                        card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
                          Subdevices: 1/1
                          Subdevice #0: subdevice #0
                        

                        This result is just sample. It might be different with your environments.
                        The combination of card number and device number(and pcm channel also) are the identifier of your device. Unless you set additional setup in your own ALSA configuration, It will have something like "hw:0" or "plughw:1,1" or "default" or just null (by your peripheral environments)

                        When you use voiceHAT, there might be possibility which has same card/device id for both of Mic and Speaker. It could be an issue for MMM-AssistantMk2 or MMM-Hotword. In that case, you need to configure ALSA setup to give different ids to devices. Sorry, I’m not the kind of Experts so I cannot help you about this topic with details.

                        1 Reply Last reply Reply Quote 0
                        • F Offline
                          fribse
                          last edited by

                          Hi @Sean

                          Thankyou for helping me.

                          Hmm:

                          pi@magicmirror:~ $ arecord -l
                          **** List of CAPTURE Hardware Devices ****
                          pi@magicmirror:~ $ aplay -l
                          **** List of PLAYBACK Hardware Devices ****
                          card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
                          Subdevices: 7/7
                          Subdevice #0: subdevice #0
                          Subdevice #1: subdevice #1
                          Subdevice #2: subdevice #2
                          Subdevice #3: subdevice #3
                          Subdevice #4: subdevice #4
                          Subdevice #5: subdevice #5
                          Subdevice #6: subdevice #6
                          card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
                          Subdevices: 1/1
                          Subdevice #0: subdevice #0
                          card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
                          Subdevices: 1/1
                          Subdevice #0: subdevice #0
                          pi@magicmirror:~ $

                          So the hat doesn’t appear at all as it is.
                          I guess I could get the AIY image, and start with that instead?
                          Then it should have the right setup.

                          ? S 2 Replies Last reply Reply Quote 0
                          • ? Offline
                            A Former User @fribse
                            last edited by

                            @fribse
                            Sorry, I have no experience of that HAT, so I don’t know its normal or not.

                            1 Reply Last reply Reply Quote 1
                            • S Do not disturb
                              sdetweil @fribse
                              last edited by

                              @fribse see https://www.raspberrypi.org/forums/viewtopic.php?f=114&t=214753

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              1 Reply Last reply Reply Quote 1
                              • F Offline
                                fribse
                                last edited by

                                So @sdetweil and @Sean

                                I started over, installed the last stretch.
                                Followed the guide on the link from @sdetweil , and Weheee:

                                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: 0/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:~ $
                                

                                Now I’ll go on, and start over with Magicmirror :-)

                                ? 1 Reply Last reply Reply Quote 0
                                • ? Offline
                                  A Former User @fribse
                                  last edited by

                                  @fribse
                                  There could be one problem. Your mic and speaker now have same id card 0, device 0 When my module try to close the mic(plughw:0,0) to output sound, the speaker(plughw:0,0) will be closed together at same time, so error will occur.
                                  I heard there is a way to assign different id or alias to devices, but don’t know how to do.

                                  F 1 Reply Last reply Reply Quote 1
                                  • F Offline
                                    fribse @Guest
                                    last edited by

                                    @Sean said in How do I get the Google AIY Voice HAT installed so that MMM can use it?:

                                    @fribse
                                    There could be one problem. Your mic and speaker now have same id card 0, device 0 When my module try to close the mic(plughw:0,0) to output sound, the speaker(plughw:0,0) will be closed together at same time, so error will occur.
                                    I heard there is a way to assign different id or alias to devices, but don’t know how to do.

                                    Ok, so it doesn’t use the subdevices to distinguish them, I guess it’s google here I come :-)

                                    1 Reply Last reply Reply Quote 0

                                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                    With your input, this post could be even better 💗

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