See when my skill reprompts users - alexa

Is there a way to see if my skill has reprompted a user? I know this happens if a user doesn't respond within an allotted amount of time and it would be informative because I'd like to rephrase some of my responses if this tends to happen more frequently for some utterances than others.

No. At this point, this isn't possible. You might be able to use a timer in your skill service to guesstimate however.

Related

Maximum duration of user speech input in seconds for Amazon Alexa skill

I am creating an Amazon Alexa skill and would like to know the maximum duration of user input in seconds that a slot can hold. More specifically the AMAZON.SearchQuery type slot.
I'm not sure there is an official answer to this anywhere in public docs, but I don't think you'll be able to capture more than a few seconds (~8 max ?) of input. Plus if Alexa detects the user is done speaking, she will stop listening and process the utterance. Even a slight pause could be interpreted as the end of speech input.
I don't know your particular use case, but given all that, I would not recommend that slot type as a reliable way to capture long transcriptions. I don't believe there is a good way for skills to do at all currently.
This Amazon Lex blog is from 2017. I don't know if it will still work, but you can give it a shot.
Capturing Voice Input in a Browser and sending it to Amazon Lex

How to get actual phrase user said for failed utterance?

The Alexa Analytics dashboard provide a view of how many utterance are successful and how many are failed as like below.
But I can't drill down to see what exact phrase customer used for my failed utterance.
In addition, Alexa does not provide any feature to programatically get what exact phrase used by customer while invoking the skill.
So, as a developer this is a big limitation towards improving skill's ability of recognizing various type of inputs. :-(
Isn't there any way to get what utterance user used ?
I can't drill down to see what exact phrase customer used for my failed utterance
"Failed Utterances" I believe means that the customer invoked an intent and that intent resulted in a failure, not that the utterance couldn't be match to an intent. If you take a look at the "Intents" tab in Analytics you should see a corresponding failure on both the "Failed Utterances Per Intent" and the "Failed Intent" graphs. This could help you find what's causing the failure.
Isn't there any way to get what utterance user used ?
While you can't, to my knowledge, match the failed intent with a specific phrase (and it may not even be relevant to do so), it might be possible to look at the general phrases spoken by users in Intent Request History. I say might because the "skill must have at least 10 unique users per locale in a day, in order for data to be available for that locale for that day". Though even then, this is only the most frequent utterances spoken, but it could never the less be worth taking a look at.

Developing an Alexa skill with custom wait time after re-prompt

I am trying to develop an alexa skill with a custom delay time. Currently, whenever a user asks a question, Alexa responds to it and waits for 8 seconds. After this, there is re-prompt speech (if present) and Alexa again waits for 8 seconds. This 16 second wait is followed by session closure.
I want to keep the re-prompt text to be active even if the user does not ask anything after 16 seconds time out. Is it possible?
This is not currently possible because Alexa will wait for a maximum of eight seconds before closing the session. You can add a re-prompt to reminder a user that a response is required to continue with the skill interaction, but it is not allowed to leave the session open for an undefined period of time. This enables the user to ask for different skills and first party features without closing a skill manually every time.
As with natural conversation, if the Alexa service thinks a question asked is misunderstood or confusing, re-prompts allow Alexa to clarify and reformulate a question to get the answer Alexa is seeking. Shorten a re-prompt for brevity when a customer is familiar enough with the context of a conversation that they won’t need the entire prompt again immediately. The key is that you provide enough information to guide the customer, understanding that you are essentially 8 seconds away from losing that connection if they don’t know how to answer. While re-prompts must be understandable, they provide an opportunity to expand on the initial request to get the conversation moving.
You can find additional info here:
https://developer.amazon.com/en-US/docs/alexa/alexa-design/available.html

Passing on goog-app-engine costs to the client

I have a google app engine application that uses the cloud datastore. My application usage is increasing, I cannot maintain it as “free” since I am paying
for the read/write operations to the datastore
the storage of data in the cloud
instance hours
I plan to charge “by the drink.” In other words, as I am charged for application usage, I will pass on that charge on to my clients. Before developing my own solution to do this, I realize that there must be countless others who have solved this problem. If so, what technique(s) have you employed?
Thank you in advance for your suggestions.
Unfortunately there is no silver bullet for this situation. Be advised, unless you really think this through keeping track of your users consumption might end up costing as much as the actual usage.
Without knowing anything else about your app its hard to help but my advice would be to use appstats to figure out the actual cost of a given service and charge the user per time accessed.
Most users do not like (actually, hate) to be charged for something they (a) do not understand, and (b) have no control over. If a phone company tells its customers to go ahead and use their service without telling them how much - exactly - they are going to pay, it will lose all customers in no time. How are you going to explain read/write datastore costs to your users, with indexed properties and all? How about query costs and instance hours? It's a difficult task even if all of your customers are software engineers.
I recommend charging users for something they understand, like creating a free and a premium version of your app with additional features, or charging per game, or per document processed (you did not tell us what your app is doing), etc.

Best implementation of turn-based access on App Engine?

I am trying to implement a 2-player turn-based game with a GAE backend. The first thing this game requires is a very simple match making system that operates like this:
User A asks the backend for a match. The back ends tells him to come back later
User B asks the backend for a match. He will be matched with A.
User C asks the backend for a match. The back ends tells him to come back later
User D asks the backend for a match. He will be matched with C.
and so on...
(edit: my assumption is that if I can figure this one out, most other operation i a turn based game can use the same implementation)
This can be done quite easily in Apple Gamecenter and Xbox Live, however I would rather implement this on an open and platform independent backend like GAE. After some research, I have found the following options for a GAE implementation:
use memcache. However, there is no guarantee that the memcache is synchronized across different instances. I did some tests and could actually see match request disappearing due to memcache mis-synchronization.
Harden memcache with Sharding Counters. This does not always solve the multiple instance problem and mayabe results in high memcache quota usage.
Use memcache with Compare and Set. Does not solve the multiple instance problem when used as a mutex.
task queues. I have no idea how to use these but someone mentioned as a possible solution. However, I am afraid that queues will eat me GAE quota very quickly.
push queues. Same as above.
transaction. Same as above. Also probably very expensive.
channels. Same as above. Also probably very expensive.
Given that the match making is a very basic operation in online games, I cannot be the first one encountering this. Hence my questions:
Do you know of any safe mechanism for match making?
If multiple solutions exist, which is the cheapest (in terms of GAE quota usage) solution?
You could accomplish this using a cron tasks in a scheme like this:
define MatchRequest:
requestor = db.StringProperty()
opponent = db.StringProperty(default = '')
User A asks for a match, a MatchRequest entity is created with A as the requestor and the opponent blank.
User A polls to see when the opponent field has been filled.
User B asks for a match, a MatchRequest entity is created with B as as the requestor.
User B pools to see when the opponent field has been filled.
A cron job that runs every 20 seconds? or so runs:
Grab all MatchRequest where opponent == ''
Make all appropriate matches
Put all the MatchRequests as a transaction
Now when A and B poll next they will see that they they have an opponent.
According to the GAE docs on crons free apps can have up to 20 free cron tasks. The computation required for these crons for a small amount of users should be small.
This would be a safe way but I'm not sure if it is the cheapest way. It's also pretty easy to implement.

Resources