question

easterntomc avatar image
easterntomc asked

How to get speech text

How to get the speech text with ask? I want to know what does my speech be transformed to, my speech offen cann't match a specify intent thanks
alexa skills kitsubmission testing certification
10 |5000

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

1 Answer

Galactoise avatar image
Galactoise answered
You can define the entire utterance as one big slot(or many small slots), in theory. I've played around with this a bit and it doesn't work super well, but if your plan is to get the entire request and do your own NLP, it may be serviceable for you. Your utterances mightlook something like: SAMPLE_UTTERANCE {This|sampleSlot} SAMPLE_UTTERANCE {This is|sampleSlot} SAMPLE_UTTERANCE {This is a|sampleSlot} SAMPLE_UTTERANCE {This is a test|sampleSlot} SAMPLE_UTTERANCE {This is a test sentence|sampleSlot} SAMPLE_UTTERANCE {This is a test sentence of arbitrary|sampleSlot} SAMPLE_UTTERANCE {This is a test sentence of arbitrary length|sampleSlot} or alternately: SAMPLE_UTTERANCE {This|sampleSlot1} {is|sampleSlot2} {a|sampleSlot3} {test|sampleSlot4} {sentence|sampleSlot5} {of|sampleSlot6} {arbitrary|sampleSlot7} {length|sampleSlot8} When you do this, though, you lose a lot of the value of the contextual matching that Alexa is doing for you, since it doesn't have any non-parameterized words to anchor itself again. If at all possible, it might be worth it to architect your skills such that a request always matches a specific intent.
10 |5000

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