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;
});
};
This is my PlaySpeech method in Amazon Sumerian Script. In the 'then' function I want to update the speech.body and then call speech.play(). How can I do it?