How can I abort Pepper speech via Tablet touchscreen?

162 Views Asked by At

I would like to interrupt Pepper's TextToSpeech service while it speaks by using Pepper Tablet application?

What is the method I need to call to terminate it's speech?

1

There are 1 best solutions below

0
On BEST ANSWER

ALTextToSpeech API offers the function stopAll()

To utilize the Pepper Tablet Application, you could make a javascript call to a function like:

function stopTalking() {
    QiSession(function (session) {
        session.service("ALTextToSpeech").then(function (tts) {
            tts.stopAll()
        }, function (error) {
            console.log("An error occurred:", error)
        })
    })
}