diff --git a/alexa-api/server.js b/alexa-api/server.js index 67ba5b8..9e4afd7 100644 --- a/alexa-api/server.js +++ b/alexa-api/server.js @@ -128,20 +128,22 @@ app.post('/speak', async function(req, res) { console.log(' -> ' + target.accountName + ' (type=' + target.deviceType + ', serial=' + target.serialNumber + ')'); - var sequenceObj = { - '@type': 'com.amazon.alexa.behaviors.model.Sequence', - startNode: { - '@type': 'com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode', - type: 'Alexa.SpeakSsml', // ← ここ変更 - operationPayload: { - deviceType: target.deviceType, - deviceSerialNumber: target.serialNumber, - customerId: customerId, - locale: 'ja-JP', - textToSpeak: text - }, - }, - }; +var ssml = '' + text + ''; + +var sequenceObj = { + '@type': 'com.amazon.alexa.behaviors.model.Sequence', + startNode: { + '@type': 'com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode', + type: 'Alexa.SpeakSsml', + operationPayload: { + deviceType: target.deviceType, + deviceSerialNumber: target.serialNumber, + customerId: customerId, + locale: 'ja-JP', + textToSpeak: ssml + }, + }, +}; var bodyStr = JSON.stringify({ behaviorId: 'PREVIEW',