question

Anthony M. avatar image
Anthony M. asked

Suggestion Help on getting Echo to process names

I'm hoping for some help/suggestions on the best way to get this to work. My issue is that I am making a game, where Echo will cycle through players in the game. When i setup the game Echo Ask each player their name. My problem is that Echo ask "What is Player X name?" so the end user can simply reply with the name. So for my sample utterance I have the below examples and I was hopeful that it would recognize the samples as names and response accordingly. askName {Anthony | Name} askName {Jeff | Name} askName {Bill | Name} askName {Justin | Name} askName {Ted | Name} But what i find is that Echo only accepts the names in the samples. If I put context around the sample it will allow any literal string like below. askName player one's name is {Ted|Name} Does anyone have any recommendations on how to phrase the question to the players so they logically respond using the phrase instead of just the name ? Thanks, Anthony
alexa skills kitvoice-user interface
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

James Chivers avatar image
James Chivers answered
Hi Antony, Please see this thread for a similar discussion: https://forums.developer.amazon.com/forums/thread.jspa?messageID=16260 In your case, can you confirm whether you have other Intents in your utterances also with no words before the Slots? For example: askName {Anthony | Name} askName {Jeff | Name} askName {Bill | Name} askName {Justin | Name} askName {Ted | Name} askAge {15|Age} askAge {16|Age} askAge {17|Age} askAge {18|Age} In the above case, I would expect Alexa _might_ get a little confused distinguishing between an age or name being spoken. What would be better: askName {Anthony | Name} ready askName {Jeff | Name} ready askName {Bill | Name} ready askName {Justin | Name} ready askName {Ted | Name} ready askAge I am {15|Age} askAge I am {16|Age} askAge I am {17|Age} askAge I am {18|Age} Let me know how you get on.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Anthony M. avatar image
Anthony M. answered
I do have other single word utterances that are numbers. I had a couple ideas this morning that I am going to try tonight that might allow it to be reworked. I'll update the post if I am able to find a better solution. Thanks!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Anthony M. avatar image
Anthony M. answered
Thanks James for the help, I reworded my prompt from Alexa to say "Say the name of Player N , followed by the word next" then changed my samples to the below samples and it now detects any name I gave it so far, be setting some previous variables I can tweak the logic with a generic intent string. getResponse {Jeff | Answer} continue getResponse {Bill | Answer} next getResponse {Ted | Answer} done
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

James Chivers avatar image
James Chivers answered
Hi Anthony, thanks for update - great news that you got it working; assuming you'll submit your game, I'm looking forward to seeing what you build!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.