Robyn Inmoov synchronising move jaw to mp3 file.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Markus's picture

from org.myrobotlab.service

from org.myrobotlab.service import Speech
import time 
mouth = Runtime.createAndStart("mouth","Speech")
keyboard = Runtime.createAndStart("keyboard", "Keyboard")
keyboard.addListener("keyCommand", python.getName(), "input")
def input(cmd):
    global millis
    if (cmd == "S"):
       interval = time.time() -  millis
       millis = time.time()
       print ("        sleep(" + str(round(interval,2) - (0.2)) + ")")
       print ("        i01.head.jaw.moveTo(50)")
       print ("        sleep(0.2)")
       print ("        i01.head.jaw.moveTo(10)")
    if (cmd == "A"):
        mouth.audioFile.playFile("C:\Users\Markus\Music\markustest.mp3", False)
        millis = time.time()
Markus's picture

Thanks Greg for helping me so

Thanks Greg for helping me so much .

kwatters's picture

Record and Playback

Great script and video Markus!  I love the idea of the code writing code.

GroG's picture

Push it Markus ! I want to

Push it Markus !

I want to hear Robyn tell me a story .. with gestures.. and exciting hand movements .. and EMOTION !

I Know You'll Rock It !

Markus's picture

Yes that's what I'm aiming

Yes that's what I'm aiming for.
So if you have trouble to fall asleep you can play Robyn Inmoov bedtime story on YouTube.haha
Or even better! You can run the program on your own Inmoov.
Peacefully falling asleep while Inmoov tuck you in. Hahaha.