Innovator-programmer
Innovator-programmer

Reputation: 331

How can I abort Pepper speech via Tablet touchscreen?

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?

Upvotes: 1

Views: 157

Answers (1)

TVK
TVK

Reputation: 1150

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)
        })
    })
}

Upvotes: 3

Related Questions