From dcbf5990158e97ed5422588fc58c4ecaef917586 Mon Sep 17 00:00:00 2001 From: Akira Date: Tue, 3 Mar 2026 10:54:38 +0900 Subject: [PATCH] =?UTF-8?q?=E8=8B=B1=E8=AA=9E=E3=82=82=E7=99=BA=E8=A9=B1?= =?UTF-8?q?=E3=81=97=E3=81=AA=E3=81=8F=E3=81=AA=E3=81=A3=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alexa-api/server.js | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) 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',