586837r / node-red-contrib-alexa-remote2

MIT License
88 stars 72 forks source link

SSML not working #44

Open psi-4ward opened 4 years ago

psi-4ward commented 4 years ago

I've tried the examples but nothing gets played on my Echo

{ raw:
   { type: 'speak',
     payload:
      { type: 'ssml',
        text: { type: 'msg', value: 'payload' },
        devices: [ 'G2A...' ] } },
  evaluated:
   { type: 'speak',
     payload:
      { type: 'ssml',
        text: '<speak>This output speech uses SSML.</speak>',
        devices: [ 'G2A...' ] } } }
{ native:
   { '@type': 'com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode',
     type: 'AlexaAnnouncement',
     operationPayload:
      { expireAfter: 'PT5S',
        customerId: 'A1B...',
        content:
         [ { locale: 'de-DE',
             display: { title: 'Node-RED', body: 'This output speech uses SSML.' },
             speak: { type: 'ssml', value: '<speak>This output speech uses SSML.</speak>' } } ],
        target:
         { customerId: 'A1B...',
           devices: [ { deviceSerialNumber: 'G2A...', deviceTypeId: 'A18...' } ] } } } }
Alexa-Remote: Sending Request with {"host":"layla.amazon.de","path":"/api/bootstrap?version=0","method":"GET","timeout":10000,"headers":{}}
Alexa-Remote: Response: {"authentication":{"authenticated":true,"canAccessPrimeMusicContent":true,"customerEmail":"...","customerId":"A1B...","customerName":"..."}}
Alexa-Remote: Authentication check successfull
Alexa-Remote: Sending Request with {"host":"layla.amazon.de","path":"/api/behaviors/preview","method":"POST","timeout":10000,"headers":{}}and data={"behaviorId":"PREVIEW","sequenceJson":"{\"@type\":\"com.amazon.alexa.behaviors.model.Sequence\",\"startNode\":{\"@type\":\"com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode\",\"type\":\"AlexaAnnouncement\",\"operationPayload\":{\"expireAfter\":\"PT5S\",\"customerId\":\"A1B...\",\"content\":[{\"locale\":\"de-DE\",\"display\":{\"title\":\"Node-RED\",\"body\":\"This output speech uses SSML.\"},\"speak\":{\"type\":\"ssml\",\"value\":\"<speak>This output speech uses SSML.</speak>\"}}],\"target\":{\"customerId\":\"A1B...\",\"devices\":[{\"deviceSerialNumber\":\"G2A...\",\"deviceTypeId\":\"A18...\"}]}}}}","status":"ENABLED"}
Alexa-Remote: Response: No body

I wonder if type: 'AlexaAnnouncement', is correct.`?

psi-4ward commented 4 years ago

Discovered it works on Gen1 Echo but not on Gen2

moryoav commented 4 years ago

I have gen2 and it works great. What I discovered is that if the device is on "Do Not Disturb" mode then regular speak works and SSML doesn't work. I cancelled the automatic switch to do not disturb mode and now it works (Echo dot v2)

586837r commented 4 years ago

I don't see anything wrong in the log. I also didn't have a problem with gen 2. Do not disturb could be the problem.

psi-4ward commented 4 years ago

DnD is off but still no success :(

alvarocastrojr commented 3 years ago

I've been strugling for 3h until I found it was just DND enabled. Thanks!