alexa-skills-kitamazon-echo

Get unformatted Alexa value from built-in AMAZON.DURATION slot type


I'm using the AMAZON.DURATION built-int slot type to get data from my custom Alexa skill. This works perfectly and converts the given duration to an ISO-8601 duration format.

For example, the slot type successfully converts "ten minutes" to PT10M and I can get this data from the request object passed to my Lambda function.

However, I would also like to pass the unformatted "ten minutes" to my Lambda function, too.

Is this possible?


Solution

  • After much trial and error, I asked this same question in the Amazon Developer forums and the official response from Amazon is:

    Hi, this isn't possible although it is an interesting request!

    I ended up writing a manual conversion function in Python.