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

    Scheduled Pinned Locked Moved System
    421 Posts 61 Posters 559.1k Views 57 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.
    • J Offline
      jomwells @Guest
      last edited by

      @sean Ah I see, its not essential at all! one minor bug I seem to have, that I have noticed does not occur for you in your demonstration video is that now, having finished the audio reply, there is often a very short sound, it sounds like the last half a second of text is repeated, sometimes it is more of a ‘buzz’, I attempted changing the encodingOut setting to one of the other options (MP3 or OPUS_IN_OGG) but both of these just give white noise (like an old tv with no signal) in place of any audio, is this something you have come across at all, and is there anything you can suggest to fix it? maybe getting the alternative encoding to work? thanks

      ? J 3 Replies Last reply Reply Quote 0
      • ? Offline
        A Former User @jomwells
        last edited by A Former User

        @jomwells
        I’m not sure.
        Voice output is just buffered stream, so just piping it to the speaker is all of mechanism. So at the moment I have no idea why last data is duplicated(?) in your environment.
        Voice output stream comes chunked, so there is some possibility of the time gap between incoming stream chunks.

        Maybe instead piping Linear16 to speaker directly, writing response stream to mp3(or ogg) file then playing that file could be one of solutions.(sorry, I didn’t implement that)

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

          @jomwells
          For the Speaker, research this.
          https://github.com/TooTallNate/node-speaker

          1 Reply Last reply Reply Quote 0
          • S Offline
            Sun @jomwells
            last edited by Sun

            @jomwells Mine is a little bit different as I use the hdmi on tv as speaker as well. the default device fall on card 0 with alsa. For microphone is usb on card 1. I don’t have problem with microphone but I did have problem with sound via hdmi. Sometime sound just come out right through the hdmi but with lag sound, sometime no sound at all and say device busy. Also, to avoid hdmi device busy, I use usb sound card instead of hdmi sound also very lag.

            pcm.!default {
            type asym
            playback.pcm
            {
            type hw
            card 0
            device 1
            }
            capture.pcm
            {
            type hw
            card 1
            device 0
            }
            }

            1 Reply Last reply Reply Quote 0
            • S Offline
              Sun @Guest
              last edited by

              @sean How to change the piping Linear 16 to ogg. Can I just put ogg in the

              encodingOut: “OPUS_IN_OGG”,

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

                @sun
                No, mp3 and Ogg should be written to file or piping to proper player, frankly I didn’t implement those function, because I thought nobody needs.
                I’ll try those till next update.

                1 Reply Last reply Reply Quote 0
                • J Offline
                  jomwells
                  last edited by

                  Thank you, I will look into piping the audio, but its unlikely I will get very far :)

                  Question: is it possible to run terminal commands at the different stages of MMM-AssistantMk2, such as running a command to turn on a GPIO pin (using the built in ‘GPIO write X 1’ ) when the module begins listening, and turning it off again when it is understanding, or speaking perhaps? the use case for which would be a status LED on the mirror. Thanks again.

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

                    @jomwells
                    You can fork my repository to yours and modify it.
                    When you want to relay status to other modules, add .sendNotification() in ’socketNotificationReceived()’ of AssistantMk2.js where proper event is located.
                    When you want to do something directly, add your job in ’Conversation.on(EVENT)’ of node_helper.js.

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      Sun
                      last edited by

                      1. What else do I need to do for install for mmm-assistantmk2 to play youtube.

                      2. I try the same command say Celine Dion The power of love. Then pop up below detail about Celine Dion and the youtube video automatically pop up but cannot play anything.

                      3. My magic mirror is vertical mode, rotate = 1 . I try to adjust from your height 480 width 854 of display but it also show in vertical mode height 480 with 640 also height 640 width 480. No different.

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

                        @sun

                        • Some youtube videos are not allowed for embedded player.
                        • some videos are not caught, it will be fixed.
                        • some videos are not only video but playlist, so it is not caught, but it will be fixed also.
                        • sometime Google gives no information about youtube. I guess smart tv is using not only YouTube but also other dedicated apps for music and video, yogether
                        D 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 6
                        • 42
                        • 43
                        • 4 / 43
                        • 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