1

我想在 Pepper 的 TextToSpeech 服务使用 Pepper Tablet 应用程序说话时打断它?

我需要调用什么方法来终止它的语音?

4

1 回答 1

3

ALTextToSpeech API 提供函数stopAll()

要使用 Pepper 平板电脑应用程序,您可以对以下函数进行 javascript 调用:

function stopTalking() {
    QiSession(function (session) {
        session.service("ALTextToSpeech").then(function (tts) {
            tts.stopAll()
        }, function (error) {
            console.log("An error occurred:", error)
        })
    })
}
于 2018-11-12T08:06:13.697 回答