Try to run the following code:
from naoqi import ALProxy
tts = ALProxy("ALTextToSpeech", "<IP of your robot>", 9559)
tts.say("Hello, world!")
ALProxy is an object that gives you acces to all the methods or the module your are going to connect to.
Every method of the module are directly accessible through the object, for instance:
almemory = ALProxy("ALMemory", "nao.local", 9559)
pings = almemory.ping()
See also