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

MM and Kalliope: make Kalliope speaking

Scheduled Pinned Locked Moved Solved Troubleshooting
14 Posts 4 Posters 4.0k Views 4 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.
  • ? Offline
    A Former User
    last edited by Feb 27, 2019, 5:22 PM

    Consider MMM-GoogleTTS also.

    S 1 Reply Last reply Feb 27, 2019, 5:55 PM Reply Quote 0
    • S Away
      sdetweil @Guest
      last edited by Feb 27, 2019, 5:55 PM

      @sean oops… didn’t see that one!

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • S Offline
        strawberry 3.141 Project Sponsor Module Developer
        last edited by Feb 28, 2019, 5:10 PM

        @NPX78 MMM-TTS is an offline text to speech, where you can choose a few different voices, but I assume the voice of the Google module sounds better, but is online.

        Here on the forum was once a member of the Kalliope team, you can reach out to him or on the kalliope project itself, if it needs to be that voice.

        Please create a github issue if you need help, so I can keep track

        1 Reply Last reply Reply Quote 0
        • ? Offline
          A Former User
          last edited by A Former User Feb 28, 2019, 5:27 PM Feb 28, 2019, 5:26 PM

          @NPX78
          After reading your question again, I have a little confusing.
          As far as I know, Kalliope has its own TTS feature using pico2wave. And there be more options to use other TTS solution(including Google TTS). So I couldn’t understand why other MM TTS module is needed.

          N 1 Reply Last reply Feb 28, 2019, 5:36 PM Reply Quote 0
          • N Offline
            NPX78 @Guest
            last edited by Feb 28, 2019, 5:36 PM

            @sean hello Sean.
            Using the TTS of Kalliope could be the better solution.
            But how can I call this fonctionnalité from a MM module

            Thank you for your time and explanations

            Regars

            Nicolas

            ? 1 Reply Last reply Feb 28, 2019, 6:00 PM Reply Quote 0
            • ? Offline
              A Former User @NPX78
              last edited by A Former User Feb 28, 2019, 6:01 PM Feb 28, 2019, 6:00 PM

              @npx78
              I have no experience with Kalliope so I’m not sure…
              I think this is showing what you needs - https://kalliope-project.github.io/kalliope/rest_api/#run-a-synapse-from-an-order
              So, by just calling Kalliope API with curl to run your reply synapse from your module after it’s job, couldn’t be done?

              N 1 Reply Last reply Feb 28, 2019, 9:28 PM Reply Quote 0
              • N Offline
                NPX78 @Guest
                last edited by Feb 28, 2019, 9:28 PM

                @sean Very good idea. Thank you.

                I look for it this evening.

                Currently : call the API REST with a synapse “repeat afer me …” : OK
                I have some problem to call the curl into javascript module.

                I use the XMLHttpRequest, but I have a beautiful: “400 (BAD REQUEST)” :)

                After a night, my brain would be better :).

                I will give you some news tomorrow.

                1 Reply Last reply Reply Quote 0
                • N Offline
                  NPX78
                  last edited by NPX78 Mar 1, 2019, 8:15 AM Mar 1, 2019, 5:32 AM

                  Hello everybody

                  Good night for my brain :) .
                  I solved my problem.

                  I will put the solution this evening (and will turn this post to solve)

                  Thanh you a lot to everybody in particular Sean.

                  Regards

                  Nicolas

                  1 Reply Last reply Reply Quote 0
                  • N Offline
                    NPX78
                    last edited by Mar 1, 2019, 4:05 PM

                    :::

                    Spoiler Text

                    :::

                    Hello

                    So my solution.

                    :::

                    Kalliope Side :

                    :::

                    //-- settings.yml file
                    
                    # ---------------------------
                    # Rest API
                    # ---------------------------
                    rest_api:
                      active: True
                      port: 5000
                      password_protected: False
                      login: admin
                      password: secret
                      allowed_cors_origin: "*" 
                    
                    

                    active:True allows using the Rest API
                    password_protected: False allows anonymous connections
                    allowed_cors_origin: allows connections from other sites. This option is mandatory because the MM site is localhost:8080 and kalliope 127.0.0.1:5000

                    Concerning the brain.yml file

                      - name: "repeat"
                        signals:
                          - order: "repeat after me {{sentence}}"
                        neurons:
                          - say:
                              message: "{{sentence}}"
                    
                    

                    This synapse allows Kalliope repeat a sentence.

                    :::

                    Magic Mirror side :

                    :::

                    The following lines could be inserted in a module file

                    //-- Create the Request object.
                    const Http   = new XMLHttpRequest();
                    
                    //-- Url to call fo our synapse.
                    const url    = 'http://localhost:5000/synapses/start/id/repeat';
                    
                    //-- Build our data to send as parameters of our request.
                    var sent     = 'This is the text I want Kalliope repeat';    //-- You can modify it
                    var data     = {"parameters" : {'sentence':sent}};
                    var dataJson = JSON.stringify(data);
                    
                    //-- Launch the request.                
                    Http.open("POST",url);
                    Http.setRequestHeader("Content-type","application/json");
                    Http.send(dataJson);
                    
                    

                    I hope to be clear :)
                    I mark the post as Solved.

                    Thank you a lot for your time and ideas.

                    Regards

                    Nicolas

                    S 1 Reply Last reply Mar 1, 2019, 4:07 PM Reply Quote 1
                    • S Away
                      sdetweil @NPX78
                      last edited by Mar 1, 2019, 4:07 PM

                      @npx78 very cool… thank you for sharing and helping others…

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

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