playSpeech(body) {
this._isSpeaking = true;
this._hostSpeechComponent.addSpeech(this._speech);
this._speech.updateConfig({
entity: this._host,
body: '<speak>' + body + '</speak>',
type: 'ssml',
voice: this._voice
});
this._speech.play().then(() => {
this._isSpeaking = false;
});
};
这是我在 Amazon Sumerian Script 中的 PlaySpeech 方法。在“then”函数中,我想更新speech.body,然后调用speech.play()。我该怎么做?