Use <audio> tag in Alexa SSML without spoken text - alexa

I’d like to use Alexa SSML to only play a notification sound via the tag. However that does seem to work only in conjunction with text.
In case it is relevant, I am sending the SSML to Alexa via the openHAB home automation software and its Amazon Echo Control binding. The devices I am sending it to are Sonos devices.
Tried to only use the audio text without spoken text, but then Alexa stays silent:
<speak><audio src="soundbank://soundlibrary/home/amzn_sfx_doorbell_chime_01"/></speak>
If I add spoken text in front, it works:
<speak>Now comes the sound: <audio src="soundbank://soundlibrary/home/amzn_sfx_doorbell_chime_01"/></speak>
How can I get it to work without the spoken text?

Related

How not to display ssml tags on Alexa screen device while sending notification in Alexa

I have implemented Alexa Proactive events to send Notification
through Our skill in Alexa. It's working fine. But Problem is we
have added SSML tag say to speak as digits 2212545 like this to handle Audio. Rightnow this tag is displaying on screen of Alexa device. We don't want to display SSML tag. Please can anyone tell how can we remove these SSML tag in our Alexa notification while displaying
This is body i am sending
{"timestamp":"2021-02-23T07:06:00.693Z","referenceId":"db8b343f-5639-431c-a436-e7c6eee604c4","expiryTime":"2021-02-24T07:06:00.693Z","event":{"name":"AMAZON.MessageAlert.Activated","payload":{"state":{"status":"UNREAD"},"messageGroup":{"creator":{"name": "Amount 5000 for user id 2212545 will be credited on
2021/10/02"},"count":1}}},"relevantAudience":{"type":"Unicast","payload":{"user":
USER_ID}}}
I have a small library for formatting and such and just run my display text through a small regular expression.
I found this here and have used it ever since.
https://forums.developer.amazon.com/questions/5433/strip-ssml-tags-for-card-output.html
var regex = /(<([^>]+)>)/ig;
cardContent = someTextWithSSMLTags.replace(regex, "");

How to use an mp4 video stored on Dropbox within an Alexa Skill that uses an ALP document

My goal is to get an mp4 video i placed in dropbox to work within my Alexa Skill in which I am using an ALP document to include multimedia support. I am not interested in using Amazon S3 storage.
I was following a tutorial by dabbelab.
I could get their video to work: https://player.vimeo.com/external/373749691.hd.mp4?s=e43554c91fc796a20f051dcb8b45a74d035a6daa&profile_id=174
I could not get an mp4 video in my drop box to work:
https://www.dropbox.com/s/i8g0j8ghzprqyp3/Baby%20Cats%20-%20Cute%20and%20Funny%20Baby%20Cat%20Videos%20Compilation.mp4?dl=0
From what I can determine through Amazon's doc, I should be able to use any mp4 as long as I am using https. It is unclear to me what it is I am missing. Any advice greatly appreciated. Thank you.
First thing I'm seeing is the link. It ends with "dl=0." That link opens a dropbox page for playing the video, not the video itself.
Change that to "raw=1" and you should get the video itself like APL needs, not an HTML page.

Adding send and microphone buttons to a bot

I'm using reactjs to build a web chat, I'm trying to display microphone and send buttons at the same time but it doesn't work, Only one of them disply, I heard that there's a limitation for doing this but I don't think so, Is there any suggestions?
Unfortunately, Web Chat is not designed for utilizing both the send button and the speak button, simultaneously. That is to say, technically, you can get both to display however if speech is enabled, then the send button will not respond.
This is because certain send elements and classes are replaced when speak is enabled. As such, even though the send button can be hacked back into Web Chat, it won't respond.
If you feel this would be a good feature for Web Chat to include, I would suggest you present it as a feature request here.
Hope of help!

Enabling background play of YouTube videos

My app had to reject it because it violates our device and network abuse policy .
They told "Modify your app to make sure it doesn’t access or use a service or API in a manner that violates its terms of service; for example, by enabling background play of YouTube videos."
How I enabling background play of YouTube videos?
This sounds similar to this issue:
Android App rejection from Google Play
So it looks like you must have a web view that allows playing youtube videos, and they will continue to play when the app is put into the background. That, apparently is against youtube's policy.
So, looks like you'll need to deal with this case inside your lifecycle's "stop" method, to pause or stop the youtube video when your app goes into the background.

How to include more than one images in Alexa card

I am working on an Alexa Skill and would like to response a Standard Card with images. Amazon said that only one image can be included in a card, but it seems that AccuWeather.com can have more than one images in a card.
image of AccuWeather.com here
For the larger weather icon on the upper part of the card, it seems using the pre-defined smallImageUrl/ largeImageUrl. How about the smaller weather icons at the bottom of the card? Does anyone know how to do that?
I believe that this image is of the built-in Alexa whether skill rather than a skill from accuweather.com. Amazon's Alexa Skill API doesn't allow for more than one image in third-party skills, unfortunately.

Resources