Sam
Sam

Reputation: 537

How to stop half-way a text to speech task?

If I use the following code to make NAO say something:

speech_recognition = session.service("ALTextToSpeech")

speech_recognition.say("I am going to have a cup of coffee right after this test, but first I'd like to see how this module operate")

How is it possible to prevent him from saying the whole phrase, say after 0.5 secs? since say() is blocking, NAO terminates the whole phrase before going to the next instruction.

So I was trying multiprocessing using the above function and the following one:

speech_recognition.stopAll() (src: [http://doc.aldebaran.com/2-8/naoqi/audio/altexttospeech-api.html#ALTextToSpeechProxy::stopAll])

but nothing happened, how to solve this issue of stopping NAO from saying the whole sentence mid-way?

Upvotes: 0

Views: 31

Answers (0)

Related Questions