Can I make Movi Go Silent Temporarily?

Hello,

I’m wondering if I could silence the Movi by adding a line of code in the Arduino Program so the Movi doesn’t say: “There is too much noise in the room”. Then Movi would be able to talk once I say the callsign or a certain command.

I don’t want to increase the Mic treshold because it works well in my environment.

The only time the Movi says: “There is too much noise in the room” is when I play sound through my Raspberry pi which is located near Movi’s external microphone. So when the SoundFX/Audio plays from the Raspberry Pi the Movi shield is still on and speaks over the audio.

Before, I had a switch that I used which would turn off/on Movi’s external speaker but I since upgraded the speaker and I am looking for an alternative so I don’t have to switch the speaker on/off every time.

  • So If I were to have something like this:

recognizer.addSentence(F("Be quiet")); //18

//(Rest of Setup & Loop Code Would go here)

 if (res == 18) 
 {
    recognizer.say("OK");
   RGB_color(0, 255, 0); //Green    
   lcd.clear();
  //Command to silence Movi would go here?
 // Movi will then be unsilenced when I say the callsign 
  }
  • Or a command line would be added in (res ==9) so Movi goes silent for, in this case 20 sec (to let the audio clip on the Raspberry Pi finish playing), and after 20 sec Movi would return to normal.

    if (res ==6) {
     digitalWrite (Button2, HIGH);
     RGB_color(255, 0, 0); //Red
     //Movi's silence command would go here (or something) <------------
     //Simulate a 2sec Button press to trigger RPi
     time_now=millis();
     lcd.clear();
     lcd.setCursor(0,0);
     lcd.print("There Are No");
     lcd.setCursor(0,1);
     lcd.print("Strings On Me");
     while(millis()<time_now+period2){
     //2sec Delay
     //wait approx 2sec to simulate virtual button press
     }
     digitalWrite (Button2, LOW);
     //Keep RGB LED and LCD Display on for 20sec
      while(millis()<time_now+period3){
     //20sec Delay
     //wait approx 20sec for Audio clip to finish playing
     } 
    RGB_color(0, 0, 0); //RGB LED Off after 20 sec  
    lcd.clear(); //Clear LCD after 20 sec
    //Movi's unsilence command would go here (or something) <------------
    }
    

Would something like that work?
And if so, what command line would I need to add to silence the Movi?

Perhaps the volume could be set to zero for 20 sec then back to the default volume. Would that work?
If so how would I go about doing that (and what is the default volume. Just curious)?

Thanks in advance.

I figured it out.

I just used recognizer.setVolume(0); //Sets Volume to 0. At the beginning
And recognizer.setVolume(100); //Sets Volume to Default (100). At the end.

It get’s the job done.