Thanks the team . i can now stop the listening and resume it and never touch the microphone icon

Robot is now autonomous

I removed the microphone from the head to avoid servo noise ,  i put it later into coton away from servo.

 

 

I publish the full project soon with messenger and global knowledge . I just need to translate it cause AIML is in french.

This is the WebkitSpeechRecognition tricks if can help others :

def onEndSpeaking(text):

          global Ispeak
          Ispeak=0
          ear.startListening()

def onStartSpeaking(text):

    global Ispeak
    Ispeak=1
    ear.stopListening()

python.subscribe(mouth.getName(),"publishStartSpeaking")
python.subscribe(mouth.getName(),"publishEndSpeaking")

WebkitSpeachReconitionFix = Runtime.start("WebkitSpeachReconitionFix","Clock")
WebkitSpeachReconitionFix.setInterval(10000)

def WebkitSpeachReconitionON(timedata):
    global Ispeak
    if Ispeak==0:
        ear.startListening()
    
WebkitSpeachReconitionFix.addListener("pulse", python.name, "WebkitSpeachReconitionON")

 

see you

GroG

8 years 4 months ago

Awesome !  ..  great video moz4r !

Quick responses, thanks for the translation :)

Nice eyelids too ..  did you give that design back to Gael ?

Hi Grog ! this is the design about eyelids from a frind : http://www.thingiverse.com/thing:1521400

The code : from org.myrobotlab.service import Servo

PaupiereServo = Runtime.start("PaupiereServo","Servo")
PaupiereServo.setMinMax(0, 22)
PaupiereServo.attach(right, PaupiereServoPin)

clock = Runtime.start("clock","Clock")
clock.setInterval(1000)
# define a ticktock method
def ticktock(timedata):
    PaupiereServo.moveTo(0)
    sleep(0.12)
    PaupiereServo.moveTo(22)
#on fait un double clignement ou pas
    if random.randint(0,1)==1:
        sleep(0.2)
        PaupiereServo.moveTo(0)
        sleep(0.12)
        PaupiereServo.moveTo(22)
#on redefini une valeur aleatoire pour le prochain clignement
    clock.setInterval(random.randint(1000,5000))
#create a message routes
clock.addListener("pulse", python.name, "ticktock")
# start the clock
clock.startClock()

 

original thread : https://groups.google.com/forum/#!searchin/inmoov/eyelid/inmoov/Pqekfz1…

Great moz4r :D   A great accessory when my InMoov is built.

There is a lot of emotional potential in your lids .. for example have you experimented with position - like 1/2 way down for sleepy, or narrow slits for angry ?