MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    UNSOLVED Voice Assistant

    Requests
    3
    7
    303
    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
      jairojosy last edited by

      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 Reply Quote 1
      • S
        sdetweil @jairojosy last edited by sdetweil

        @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

        Create a working config
        How to add modules

        1 Reply Last reply Reply Quote 0
        • M
          MMRIZE @jairojosy last edited by MMRIZE

          @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 Reply Quote 0
          • J
            jairojosy @MMRIZE last edited by

            @mmrize I would like to use self-made assistant

            M 2 Replies Last reply Reply Quote 0
            • M
              MMRIZE @jairojosy last edited by MMRIZE

              @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
                MMRIZE @jairojosy last edited by MMRIZE

                @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
                  sdetweil @jairojosy last edited by sdetweil

                  @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

                  Create a working config
                  How to add modules

                  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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy