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

Voice Assistant

Scheduled Pinned Locked Moved Unsolved Requests
7 Posts 3 Posters 921 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.
  • J Offline
    jairojosy
    last edited by Oct 6, 2021, 12:09 PM

    I have created my own python voice assistant. Now, I would like to display the output of the voice assistant like it does for google assistant as shown below :
    dde657b1-97d1-4f25-89e8-69b4a504661f-image.png
    How can I configure my python voice assistant to display an output like this ?

    S M 3 Replies Last reply Oct 6, 2021, 12:15 PM Reply Quote 1
    • S Away
      sdetweil @jairojosy
      last edited by sdetweil Oct 6, 2021, 12:16 PM Oct 6, 2021, 12:15 PM

      @jairojosy u will have to write a module that provides content for the display

      you can look at/buildon my pythonPrint module that launches a python app and displays it’s stdout content
      https://github.com/sdetweil/MMM-PythonPrint

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • M Offline
        MMRIZE @jairojosy
        last edited by MMRIZE Oct 6, 2021, 12:16 PM Oct 6, 2021, 12:16 PM

        @jairojosy
        Use already existing module like MMM-GoogleAssistant.
        Your python app is not compatible with MM. At least you need to hook the output response then transmit to MM, and also you need to build a receiver module to get and display conversation. I will not say it is impossible, but not so quite simple. Why are you reinventing wheel again?

        J 1 Reply Last reply Oct 6, 2021, 12:16 PM Reply Quote 0
        • J Offline
          jairojosy @MMRIZE
          last edited by Oct 6, 2021, 12:16 PM

          @mmrize I would like to use self-made assistant

          M 2 Replies Last reply Oct 6, 2021, 12:32 PM Reply Quote 0
          • M Offline
            MMRIZE @jairojosy
            last edited by MMRIZE Oct 6, 2021, 12:33 PM Oct 6, 2021, 12:32 PM

            @jairojosy
            Ok.
            I assume you are using Google Assistant Service SDK with Python library.
            You may get the response from Assistant Server as AssistResponse. You can find some member data of that response like audio_out or screen_out, or DialogStateOut.supplemental_display_text or whatever you need.

            Once you extract the data you need, the next thing you need to do is emit that data into MM. A usual way might be REST-like requesting/responsing. You need to build MM module which can handle HTTP request/response, like GET http://localhost:8080/MMM-MyGoogleAssistant/message?... I think you can make your python app to request your data through that REST-like URL.

            Another way might be using MQTT, or websocket messaging. Or if you have some experience, you can execute your python app inside your node module then get the stdout as an input stream.

            I recommend implementing with native MM module by nodeJS instead of external Python thing. but decision is yours.

            1 Reply Last reply Reply Quote 0
            • M Offline
              MMRIZE @jairojosy
              last edited by MMRIZE Oct 6, 2021, 1:00 PM Oct 6, 2021, 12:54 PM

              @jairojosy
              This would be unnecessary worrying, but I have to point these things;

              • Implementing Google Assistant in a device doesn’t mean you can handle that device with voice commands. The two things are less related.
              • For native commanding MM with voice, you need to host Custom Device Actions by yourself. (Or you can depend on IFTTT, but somewhat limited features)
              • To get the benefit of native flawless conversation, you might need dyanmic or local fulfillment, but in that case Certificated server is needed.

              However, whole the experience will probably be interesting and funny. Good luck to you.

              1 Reply Last reply Reply Quote 0
              • S Away
                sdetweil @jairojosy
                last edited by sdetweil Oct 6, 2021, 1:06 PM Oct 6, 2021, 1:02 PM

                @jairojosy as @MMRIZE mentions, mm is JavaScript, so your only real choice is to execute your assistant outside mm, and collect it’s output, and pass that to a mm module that understands what the output message means.

                not that hard really. PythonPrint shows a simple stdout approach.

                getting the mic to work for input has always been the hardest. none of the good voice reco engines are free anymore, but not expensive. google charged me 51 cents for last months reco usage.

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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