Voice Command

 

 

:Main

   

    //{ "Main/Startup(once)"

      PLAY ACTION STAND

      WAIT

    //}

 

    // clear globals and sensors

 

    CLR SENSORS

  

    // Main Loop

    WHILE 1 = 1

 

    

        IF AU_Voice > 0 THEN

            PUSH AU_Voice_ID

           

            CALL Voice_Handler:1

            SET AU_Voice 0

           

        ENDIF

 

       

    WEND // end of main loop

 

 

/////////////////////////////////////////////////////////////

// _Handler routines

 

:Voice_Handler

  ARG id

 

  IF id == 30 THEN

    //{ "AIBO voice command/'Stand up'"

      PLAY ACTION STAND

      WAIT

    //}

  ENDIF

  IF id == 31 THEN

    //{ "AIBO voice command/'Lie down'"

      PLAY ACTION LIE

      WAIT

    //}

  ENDIF

  IF id == 32 THEN

    //{ "AIBO voice command/'Sit down'"

      PLAY ACTION SIT

      WAIT

    //}

  ENDIF

 

//REVIEW: extended vocabulary

 

RETURN

 

 

Description:

 

     When you say STAND UP, SIT DOWN, LIE DOWN to AIBO, he will do the same way you want.