我想在 Pepper 的 TextToSpeech 服务使用 Pepper Tablet 应用程序说话时打断它?
我需要调用什么方法来终止它的语音?
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)
})
})
}