1

Can we use Amazon Lex just to convert text from voice and pass the text input to our lambda function? I want to capture the whole user speech and get it converted into text and further, want to process that text in my lambda function.

1 Answers1

1

The answer really depends on how much speech you intend to collect from Lex to pass over to Lambda. If you want to send full recordings of speech to be converted into text, I would recommend looking at the Amazon Transcribe service first.

If you are looking to just collect simple speech, you can configure an intent in Lex to match an utterance. Then prompt the user for additional speech information using slots as seen below. This example has a prompt asking for the user's name and then inserts it into a slot called "Name".

Example Lex Slot

From there, just setup the Fulfillment on the Intent to point to your Lambda function as seen below where I pass this information to a Lambda function called "LEX_CollectSpeech".

Fulfillment

You can find the Lambda documentation that outlines the expected input from Lex and Response formats here. https://docs.aws.amazon.com/lex/latest/dg/lambda-input-response-format.html

Parrett Apps
  • 569
  • 1
  • 4
  • 14
  • 1
    This answer is misleading. There also isn't enough in the screen-shot to show how it was implemented. – Cognitiaclaeves Apr 14 '19 at 03:28
  • @Cognitiaclaeves could you clarify what part of the answer you found misleading? – Yu Chen Jul 28 '21 at 18:45
  • Apparently not. It's been two years since I stumbled onto this question while trying to do a very specific thing during the throes of a hack-a-thon. I don't have a clue what I was referring to. Because of this, I unsuccessfully tried to remove my judgment on this response. – Cognitiaclaeves Aug 02 '21 at 18:10