NAO
4

Motion + speech python

Hello, I work on the NAO with a version 3 (software version V 1.14.5) and I would like to know, if it was possible that the nao speech and move in the same time with a python program ? Because the both function ( say (ALTextToSpeech) and angleInterpolation (ALMotion)) are a blocking call. Did you have a solution ?

Thanks for the answer,

julien

Answers

Hello,

yes it's very easy, and it hasn't changed since, here's an example:

tts = naoqi.ALProxy( "ALTextToSpeech" ) motion = naoqi.ALProxy( "ALMotion" )

tts.post.say( "i'm currently moving my joint" );

motion.angleInterpolation( command parameter )

Bye,

Alexandre

thanks you, But I didn't see this instruction in your nao documentation...

If you add a "post." prefix to a blocking function that you continue onto another thread.

See here:

http://doc.aldebaran.com/2-1/dev/python/making_nao_move.html?highlight=post

I'm still quite learning as well. But I've heard that parallel processing is the answer to your question. Like what Alexandre M. is showing you, which is by using the "post" keyword.

Back to top