Echo Speaks Random SSML Response


#1

1) Give a description of the problem
I must have been living under a rock for the past year. Just discovered SSML and would like to incorporate that into some of my existing random speaking sections

2) What is the expected behaviour?
I was hoping it would just work with the added SSML syntax

3) What is happening/not happening?
When I add
With: Echo Device
Do: Speak

It works fine without the SSML syntax.

**4) Post a Green Snapshot of the piston![image|45x37]


#2

In the piston I use, the random() part is a separate variable that picks the random text. That variable is then inserted in the SSML, ie. <speak>variableName</speak>


#3

Can you post an example. I am not quite sure I understand. I am really only good at copying something I have seen. :flushed:


#4

I just tried this and it worked.

The SSML tags do not show but this is what I used. I copied it from the amazon site. I was also going to suggest what eibyer said, I use random in a couple of pistons. I set the random to a separate variable as well.

<voice name="Kendra">I am not a real human.</voice>

Changing the voice works, that is pretty cool, I had not heard of this either


#5

Here is an example of what he was talking about. This piston selects random music to play.


#6

Let me save you the learning curve. This site is your friend. https://topvoiceapps.com/ssml
You can test much easier then copy and paste into webcore. This site doesn’t have all the options so some require manual typing.

You can get pretty elaborate.

<audio src="soundbank://soundlibrary/animals/amzn_sfx_dog_med_bark_2x_02"/><voice name="Salli">Good Morning Courtney,<break time="500ms"/>Ginger and Paddy are Hungry</voice>
Sound Library - https://developer.amazon.com/en-US/docs/alexa/custom-skills/ask-soundlibrary.html

<speak><voice name="Matthew"><amazon:domain name="news">Breaking News: Its now school time</amazon:domain></amazon:domain></voice></speak>


#7

Like this?


#8

This is basically the same thing, but you need to have brackets around your variables inside the random call.

I would go with something like this. Whether you make them fixed when defining them doesn’t really matter if they are not going to change, but it was easier to duplicate them in the code for this example.


#9

Been working fine for a few days now all my webcore triggers read the code. Anyone else notice this?


#10

Yes, I have been having the same issue for the last couple days. Alexa just reads the code instead of interpreting it.


#11

My wife just noticed one is still working. The one that has <speak></speak> around it. In webcore I am using the Speak command. I can’t figure out the audio files so if anyone figures it out let me know. Hopefully this will help others.


#12

Mine was working yesterday. I haven’t heard any of them today. I just updated them all yesterday. I only had a few simple phrases and just putting a period or comma was sufficient. That stopped working a few days ago.

When I first started testing my SSML yesterday Alexa was reading the tags, so I had to add the speak tags at the beginning and end and then it seemed to work as intended. I didn’t remember having to do that before.

Do you guys have the <speak></speak> in your phrases.


#13

I had it in just one. I saw your post over on the Echo speaks but when I tried your suggestion adding the speak didn’t fix it. I then discovered I paused the piston so my virtual switch to test it wasn’t working anymore. :man_facepalming:
Thanks! I have a lot of cleaning up to do.


#14

That seemed to fix it for me. Strange it was working for a few days without it but now it is required. Thanks!


#15

I had did a few test with this a week or so ago, and I didn’t remember having to have the speak tags. So it apparently changed.


#16

I noticed many of my more advanced ones no longer work. The nice part is now that I have added speak around the code it no longer rambles off gibberish but it just doesn’t play anything.

It does play fine on this testing site I found. https://topvoiceapps.com/ssml

<speak><voice name="Matthew"><prosody rate="slow"><prosody volume="loud">Ginger looks hungry!</prosody></prosody><break time="800ms"/> <prosody rate="Slow">Ok I lied she doesn't, but you should feed both of the Dogs. A walk wouldn't hurt either.</prosody> </voice></speak>

Those with sound clips don’t work either.
<speak><audio src="soundbank://soundlibrary/animals/amzn_sfx_dog_med_bark_growl_01"/><amazon:domain name="conversational"><voice name="Joanna"><prosody volume="x-loud">The animals are still waiting for dinner! <break time="1s"/>Kaitlyn, I am talking to you</prosody></voice></amazon:domain></speak>

If anyone has figured it out please let me know.