InvalidSlotTypeLiteral: Slot type "AMAZON.LITERAL" for slot "Text" in intent "RawText" is not valid

892 Views Asked by At

AMAZON.LITERAL is deprecated as of October 22, 2018. Older skills built with AMAZON.LITERAL.

What is the alternative to AMAZON.LITERAL, I want each and every word spoken by user from Alexa device in my endpoint API.

I have created custom slots, but my endpoint is not called everytime.

Anyone have solution to this?

1

There are 1 best solutions below

9
On

You will not get the entire user input through any inbuilt slots or intents. The closest one to your requirement that I can think of is AMAZON.SearchQuery.

AMAZON.SearchQuery

AMAZON.SearchQuery is a phrase-type slot that lets you capture less-predictable input that makes up the search query. You can use phrase slots when you cannot predict all possible values the user might say, or when there may not be an identifiable pattern that can be captured by a custom slot. The intended use of this slot is to capture short messages, comments, search queries, and other short free-form text, not the entire user spoken utterance.

Ex:

{
  "intents": [
    {
      "name": "SearchIntent",
      "slots": [
        {
          "name": "Query",
          "type": "AMAZON.SearchQuery"
        },
        {
          "name": "CityList",
          "type": "AMAZON.US_CITY"
        }
      ],
      "samples": [
        "search for {Query} near me",
        "find out {Query}",
        "search for {Query}",
        "give me details about {CityList}"
      ]
    }
  ]
}

You cannot add sample intent utterances consisting of only phrase type slots. That means, you cannot give something like this:

{
   "name": "QueryIntent",
      "slots": [
         {
            "name": "query",
            "type": "AMAZON.SearchQuery"
         }
       ],
   "samples": [
      "{query}"   // utterance with only phrase-type slot
   ]
}

More on AMAZON.SearchQuery here


Alexa will always will fire a POST request to your skill's endpoint with a payload whenever there is a user interaction.