kevin-mitchell / alexa-app

Set of classes to make creating Amazon Alexa Skills Kit (ASK) applications easier with Laravel and Lumen
MIT License
97 stars 47 forks source link

SSML generated by app cannot be played by echo (probably wrong usage of lib) #45

Open luebbert42 opened 6 years ago

luebbert42 commented 6 years ago

I am trying to use SSML. This is what I have so far:

$out = 'Test <say-as interpret-as="interjection"> abracadabra!</say-as> Something else';
return \Alexa::say($out, "SSML")->endSession(false);

In the simulator this arrives as:

"outputSpeech": {
      "ssml": "Test <say-as interpret-as=\"interjection\"> abracadabra!</say-as> Something else",
      "type": "SSML"
    },

The simulator can output this, the real device refuses to do that ("problem has occured" -> don't know the correct error msg in English).

Questions:

In other words: How can I bring SSML to life with this library?

Olofguard commented 6 years ago

+1 for anyone looking into this. Anyone using SSML successfully with this library? Haven't really dug into this yet but it's next on my list.

wertmenschen commented 6 years ago

return Alexa::ssml('<speak>' . $text . '<break time="2s"/>' . $text2 . '</speak>'); works for me.