How do I define a custom slot type that isn't a list?

后端 未结 5 1643
盖世英雄少女心
盖世英雄少女心 2020-12-24 02:09

I\'m playing around with the Alexa Skills Kit (for the Amazon Echo) and want to create a skill that would send the intent to an AWS Lambda function which would just email so

5条回答
  •  难免孤独
    2020-12-24 02:30

    I tried another approach to this.

    I created a Custom Slot Type with a list of values like this.

    wordOne
    wordOne wordTwo
    wordOne wordTwo wordThree
    wordOne wordTwo wordThree wordFour
    wordOne wordTwo wordThree wordFour wordFive
    

    You can continue the list with as long strings as you need.

    My guess was that Alexa, when trying to fill slots, orientates on the amount of space seperated words in a value of a slot type, to match what it heard.

    I had quite some success grabbing whole sentences in a single slot with this Custom Slot Type. Though i have never tested it on intents with more than just the slot as utterance.

    But if you seperate your intent it might work. Maybe something like this.

    StartMemoIntent take a memo
    StartMemoIntent to take a memo
    StartMemoIntent send a memo
    StartMemoIntent record a memo
    StartMemoIntent listen to my memo
    RecordMemoIntent {memo}
    

    You have to be careful though, it can confuse the intents if you have not enough sample utterances for your other intents.

    If you put enough sample utterances, at least 7-8, with the StartMemoIntent it should have no problem taking the right one.

提交回复
热议问题