Reinhard
Reinhard

Reputation: 1

Amazon Echo Skills Error Invalid text input

I'm very new with Amazon Echo skills programming. I tried the amazon trivia example with reeindeer trivia. But when I'm going to test it, I always get the same error message.

In the test environment:

I initiate the skill with: start

Then you have to answer with a number: 3 or the answer is 3

Each time I get the same error message:

Error: Invalid text input. Text should begin with a unicode character and should only contain unicode characters, spaces, periods, or apostrophes.

Any idea what could have gone wrong?

Upvotes: 0

Views: 706

Answers (1)

walkersan
walkersan

Reputation: 11

I had the same error with my first custom alexa skill. I have not worked with the reindeer games sample code. My skill was loosely based on the Minecraft helper example.

Here's how I fixed it.

Broken: I would tell Alexa something that included a number. Let's use 45 as an example. I got the error.

The word "unicode" in the error message is the clue. Numbers are represented differently in unicode.

Fixed: I changed my code to read "forty five." And it worked.

With a voice UI, this is kind-of-sort-of a new twist on the old problem of numbers vs. strings.

EDIT: adding that alexa provides SSML speech markup language. The "say-as" tag enables you to pick if a number should be read back as a number or by saying the digits (for a phone number, for example). This may not apply to your question but is worth noting for other issues with numbers. More info at https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference#say-as

Upvotes: 1

Related Questions