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 ?
-
@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? -
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
-
@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 filenamefrom the web? how did that happen? was there a search?
what plays that? how do you invoke it.
-
@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;
-
@alexmann does the vlc command work?
and you are logged on as the user MagicMirror -
@sdetweil Not sure, I understand your question, the vlc doesnt work, I use ubuntu for my mirror
I just removed the username -
@alexmann open a terminal window and
enter the vlc command you supplied in the recipedoes 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.
-
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
-
@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
-
@sdetweil said in A model that play a video or mp3 file from local drive, based on a Google Assistant command ?:
vlc -f file:///home/MagicMirror/video1.mp4
Thank you, Sam,
Actually , It worked, the command execute the mp4 file,