Get CPR certified in 30 minutes at CPR Test Center.
Echo & Alexa Forums

Trigger some action

0 Members and 2 Guests are viewing this topic.

general667

Trigger some action
« on: August 09, 2016, 01:26:30 pm »
Hi

I'm new in Amazon echo. I tried to develope my first app and it's working good.
I want to try something complicated. Is it possible to trigger some function (Alexa will say something) anytime without speaking to Alexa?

DParker

Re: Trigger some action
« Reply #1 on: August 09, 2016, 03:36:14 pm »
Hi

I'm new in Amazon echo. I tried to develope my first app and it's working good.
I want to try something complicated. Is it possible to trigger some function (Alexa will say something) anytime without speaking to Alexa?

If you've developed a custom AVS (Alexa Voice Service) "skill" then you must already know that they are just event handlers.  That is, your skill's code is only invoked in response to an event (in this case, a request from an Alexa-enabled device, like an Echo), one of the results of which might be some text sent back to that device which is then converted to speech output.  But you can't use a skill to send unsolicited speech to an Alexa device, because the skill never runs unless it's been invoked due to a request from an Alexa device.  Furthermore, your response can only be sent to the Alexa device that issued the request that it is a response to.  So, you could develop your own Alexa device (say, a piece of software on an internet-connected PC, mobile device, etc) that interfaces with the AVS by submitting requests that your software generates based on whatever criteria you wish, but the response from your custom skill would be returned only to that same device.

The short answer?  No, you cannot use a custom skill to send unsolicited speech to your Echo (nor any other Alexa-enabled device).  That's just not how the Alexa Voice Service is architected.

general667

Re: Trigger some action
« Reply #2 on: August 10, 2016, 12:29:27 pm »
@DParker thank you for reply!