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.

    Voicecontrol interaction with compliments

    Scheduled Pinned Locked Moved Troubleshooting
    1 Posts 1 Posters 995 Views 1 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.
    • L Offline
      LincolnClay
      last edited by LincolnClay

      Hi, I am using the voicecontrol by alexya and I am trying to display a message on the mirror after saying a hotword. Because this is a one-time thing, I figured I could use the compliments module to display the message.

      I have downloaded the .pmdl file from Snowboy, but I still struggle to implement the code in the compliments module.
      This is how my config file looks like:

      {
      			module: 'voicecontrol',
      			position: 'bottom_left',
      			config: {
      				models: [
      					{
      						keyword: "Test",   // keyword 
      						description: "Say 'Test",
      						file: "Test.pmdl", // trained model file name
      						message: "PLAY_MUSIC"   // notification message that's broadcast in the MagicMirror app
      					},
      				]
      			}
      		},
      

      Obvously I know PLAY_MUSIC is incorrect, but I still havent found out what the correct command would be to display the message in the compliments module.

      Also if I understood it correctly the following code is suppsoed to go within the compliments.js file.

      notificationReceived: function(notification, payload, sender) {
      		if (notification === "Test"){
      			this.media.play();
      		}
      	},
      

      What should I replace with PLAY_MUSIC and this.media.play(); to display a message from the compliments module ?

      And how do I specify what kind of message that get displayed?

      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 Sam, technical setup by Karsten.
      This forum is using NodeBB as its core | Contributors
      Contact | Privacy Policy