Help with code 2

I’m a BEGINNER to coding and I am using the MOVI Voice shield to code an animatronic robot using the code format below. I was wondering how I would incorporate servo movement in this code using this code format, so every time the Movi Shield responds the servo moves up and down in sync with the voice.

(This is for the mouth/jaw part of the robot so it looks like it is talking. The servo will only be moving up and down (90 degrees, then back to original position).

Thanks in advance,
NOTAPRO.

#include <MOVIShield.h>

MOVI recognizer (true); //Get a MOVI object, true enables serial monitor interface, rx and tx for alternate communication pins on AVR architecture boards

void setup() {
recognizer.init();
recognizer.callSign(F(“Baxter”)); //Train callsign (may take 20 seconds)
recognizer.addSentence(F(“How are you”)); //1
recognizer.addSentence(F(“Who are you”)); //2
recognizer.addSentence(F(“Run system check”)); //3
recognizer.addSentence(F(“Goodbye”)); //4
recognizer.addSentence(F(“Are you a robot”)); //5
recognizer.addSentence(F(“Run diagnostics”)); //6 (Be sure to update the response every time)
recognizer.train();

}

void loop() {
int res = recognizer.poll();

if (res == 1) {
recognizer.say(“I am doing just well”);
recognizer.ask();
}
if (res == 2) {
recognizer.say(“I am a Life Model Decoy”);
}
if (res == 3) {
recognizer.say(“Systems operating at full capacity”);
}
if (res ==4) {
recognizer.say(“Goodbye”);
}
if (res ==5) {
recognizer.say(“Pish posh”);
}
if (res ==6) {
recognizer.say(“There is 67% of program storage space and 70% of dynamic memory avaliable”);
}
}

Could you share with us the functions you need to call in the motor control? Also, are these functioins returning immediately or are the motor functions waiting until the motor is a specific step?

Gerald