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

MIT License
88 stars 71 forks source link

SSML audio #17

Open mohesles opened 5 years ago

mohesles commented 5 years ago

Ive been able to use SSML correctly except for audio tags.

I have tried hosted <speak>HI<audio src="https://s3-us-west-1.amazonaws.com/sayspring-prod/media/celtic-open-chime.mp3" />Welcome</speak>

and amazon native sounds <speak>HI<audio src="soundbank://soundlibrary/transportation/amzn_sfx_car_accelerate_01" />Welcome</speak>

In both scenarios the audio tags are just ignored by alexa and the rest spoken normally.

thomas314159 commented 5 years ago

Thanks for the great node!

I also have no success with

eRudy commented 5 years ago

Hello,

same problem here: the audio tag produces no sound, even with the Amazon sound bank. Is this a limitation from Amazon ?

586837r commented 5 years ago

Don't know the reason but unfortunately audio tags don't seem to work at the moment.

mohesles commented 5 years ago

Don't know the reason but unfortunately audio tags don't seem to work at the moment.

Could it be that the code is escaping <><> tags?

586837r commented 5 years ago

No, any other tags work it is some limitation from amazon.

martinschki commented 5 years ago

second this...this would be really cool to use it as a door bell for example...

zyrorl commented 5 years ago

unfortunately it seems this is a limitation by amazon.. frustrating

zimmer62 commented 4 years ago

Wondering if anything has changed since August... just wasted an hour trying to do this.

tdejneka commented 4 years ago

Just tried it today, sending to a 3rd generation Echo Dot using an Amazon account without Prime, and it was only able to produce the text portions of the SSML phrase, not the audio tags.

877dev commented 4 years ago

Same here, I realised SSML is the way to go but nothing works so far..

877dev commented 4 years ago

@martinschki recent update supports doorbell :)

mfl76 commented 4 years ago

@877dev: Did you use the "Sound"-command or the "Speak" - SSML with audio tag? I did not get to work the <audio src="soundbank://soundlibrary/transportation/amzn_sfx_car_accelerate_01" /> in speak - ssml. The sound command works for me too.

zimmer62 commented 4 years ago

soundbank didn't work for me also, but I do see some sounds now like doorbell.

SteveRMann commented 4 years ago

Amazon uses a subset of SSML. I use this as a guide:

SSML Tags Supported by Amazon Polly

kfishermail commented 3 years ago

I found sort of a work around to play a beep whenever something happens in my system. Use the "expletive" tag. Try this...

.
mholttech commented 3 years ago

So I was working on this just last night and if you look at https://developer.amazon.com/en-US/docs/alexa/custom-skills/speech-synthesis-markup-language-ssml-reference.html#audio it provides some information about how the MP3 must be encoded in a specific way. In addition to that I used this to play an MP3 file as a "Speak at Volume - Regular" command:

<speak> <audio src="https://jhsfkl78345hkjd.s3-us-west-2.amazonaws.com/alarm1-alexa.mp3" /> </speak>

bbostock commented 3 years ago

On a similar topic, I also want to make the 'Red alert' sound which works if I explicitly define it, but I can't get it to work from a message. Any ideas of the correct message format? This is what I use, and it returns success, but no sound. {"topic":"Alexa Message","type": "sound","payload":{"sound": "Red alert","devices": ["Kitchen Echo Show"]}}

MTrinkiesJr commented 2 years ago

Hey there, the solution from @mholttech works! The important thing is that the mp3 file is accessible from the internet via not self-signed https. Also you need to have a limit of 240 seconds, the bit rate must be 48kbps and the sample rate must be 22050Hz, 24000Hz, or 16000Hz. For more information to convert (even with audacity) see: 22050Hz, 24000Hz, or 16000Hz.

To trigger the mp3 sound from nodered use the "Alexa Routine" node. Use "Speak at Volume" with "Regular" option. For the text you can insert all mentioned here: eg:

`

Play sound

`

or only

`

877dev commented 2 years ago

I'm getting Alexa to say this at least, tried a correct format mp3 via github, dropbox, jovo tech and other websites in case it was the htpps issue...

"Sorry, I'm having trouble accessing your Simon Says EU skill right now."

fpovoski commented 2 years ago

Same problem as above "Sorry, I'm having trouble accessing your Simon Says EU skill right now."

minhdirox commented 1 year ago

Confirm the comment from MTrinkiesJr work! The format of mp3 files must be correct and the public URL endpoint must provide an SSL certificate signed by an Amazon-approved certificate authority.

ronsegal commented 11 months ago

This is an example that works for me:

<speak>
<audio src="soundbank://soundlibrary/musical/amzn_sfx_bell_timer_01"/>
<prosody rate="slow" volume="x-loud" pitch="-10%" intensity="medium">You have mail.</prosody>
</speak>