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

A model that play a video or mp3 file from local drive, based on a Google Assistant command ?

Scheduled Pinned Locked Moved Development
14 Posts 2 Posters 3.4k Views 2 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.
  • A Offline
    alexmann
    last edited by Dec 20, 2023, 9:23 PM

    Hello
    I hope anyone can help me,
    I want a method, or a model So when I Say Jarvis play “the name of file” Google Assistant “Jarvis in my case will play the vdeio”.

    Please any hints?

    Thank you so much

    S 1 Reply Last reply Dec 20, 2023, 11:59 PM Reply Quote 0
    • S Away
      sdetweil @alexmann
      last edited by Dec 20, 2023, 11:59 PM

      @alexmann well hints, see the recipes folder. a recipe takes a voice utterance and then does something.

      do you have a command that will play a video?
      or music?

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • A Offline
        alexmann
        last edited by Dec 23, 2023, 7:38 PM

        Thank you Sam very much for your reply,

        Would you please explain about the recipe folder method, because I tried it many times, and nothing works,

        I want to say to GA by example, Jarvis, Good morning, and Jarvis respond with that small video.

        Very simple yet Can’t find a model or method to do it.

        Thank you very much

        Regards

        S 1 Reply Last reply Dec 24, 2023, 2:41 AM Reply Quote 0
        • S Away
          sdetweil @alexmann
          last edited by Dec 24, 2023, 2:41 AM

          @alexmann the recipes look pretty straight forward. but there is not one that does what you want.

          so you have to make/invent one

          of course one has know what to do when the voice command comes in
          .where does the video or music come from? local disk? so you need the filename

          from the web? how did that happen? was there a search?

          what plays that? how do you invoke it.

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          A 1 Reply Last reply Dec 25, 2023, 10:27 AM Reply Quote 0
          • A Offline
            alexmann @sdetweil
            last edited by Dec 25, 2023, 10:27 AM

            @sdetweil Thank you so much for your answer,

            Actually, I tried, many times, but nothing worked,

            Please have a look

            var recipe = {
                transcriptionHooks: {
                    "imBackHome": {
                        pattern: "I'm back home",
                        command: "playVideo"
                    }
                },
            
                commands: {
                    "playVideo": {
                        shellExec: {
                            exec: "vlc -f file:///home/MagicMirror/video1.mp4"
                            
                        }
                    }
                }
            };
            
            exports.recipe = recipe;
            
            
            S 1 Reply Last reply Dec 25, 2023, 12:47 PM Reply Quote 0
            • S Away
              sdetweil @alexmann
              last edited by sdetweil Dec 25, 2023, 12:49 PM Dec 25, 2023, 12:47 PM

              @alexmann does the vlc command work?
              and you are logged on as the user MagicMirror

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              A 1 Reply Last reply Dec 25, 2023, 4:36 PM Reply Quote 0
              • A Offline
                alexmann @sdetweil
                last edited by Dec 25, 2023, 4:36 PM

                @sdetweil Not sure, I understand your question, the vlc doesnt work, I use ubuntu for my mirror
                I just removed the username

                S 1 Reply Last reply Dec 25, 2023, 5:07 PM Reply Quote 0
                • S Away
                  sdetweil @alexmann
                  last edited by Dec 25, 2023, 5:07 PM

                  @alexmann open a terminal window and
                  enter the vlc command you supplied in the recipe

                  does that work?

                  if not then it won’t work from the recipe either.

                  I don’t know how to play video or music from the terminal window by command, so I can’t help you there. but the recipe is how you connect ga to doing things like this.

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    alexmann
                    last edited by Dec 26, 2023, 12:45 PM

                    Ah, Now I uderstand , acutally yes, It open the vlc have a look

                    
                    r:~/MagicMirror$ vlc
                    VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)
                    [0000555bf0104640] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
                    [0000555bf01a52d0] main playlist: playlist is empty
                    
                    
                    
                    S 1 Reply Last reply Dec 26, 2023, 1:22 PM Reply Quote 0
                    • S Away
                      sdetweil @alexmann
                      last edited by Dec 26, 2023, 1:22 PM

                      @alexmann that didn’t answer the question.

                      does the whole command you have in the recipe work

                      vlc -f file:///home/MagicMirror/video1.mp4
                      

                      or the cvlc command as it suggests

                      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
                        3/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