awslabs / aws-lex-browser-audio-capture

An example web application using the Lex JavaScript SDK to send and receive audio from the Lex PostContent API. Demonstrates how to capture an audio device, record audio, and convert the audio into a format that Lex will recognize, and play the response. All from a web browser.
MIT No Attribution
165 stars 75 forks source link

How to run example? #5

Closed NealWalters closed 6 years ago

NealWalters commented 6 years ago

This seems to be what I've been looking for! I'm trying to run the example. So I have to create a Lex/BOT first? Do you include some "BotBot" in the package that I can just upload to get it to work as a proof of concept?

Since I have not created a lex/bot yet, I get a 403 Forbidden on url: https://runtime.lex.us-east-1.amazonaws.com/bot/BotBot/alias/%24LATEST/user/userId/content 403 (Forbidden)

I then created the BookTrip default bot on Lex (did a build and publish - in the east-1 region), and tried putting that in the browser, then go this: POST https://runtime.lex.us-east-1.amazonaws.com/bot/BookTrip/alias/%24LATEST/user/userId/content 403 (Forbidden)

Thanks, Neal

palafranchise commented 6 years ago

Hi Neal,

You do need to create a bot. "BotBot" was the bot name used in the companion blog post. I've gone ahead and removed the "BotBot" default value from the example to avoid confusion.

I also pushed a fix for the 403 issue--if you pull the latest you should be good to go.

Happy Thanksgiving!

Andrew

NealWalters commented 6 years ago

It's working, very cool! I will probably try to create a YouTube demo.
Another cool example would be to save the voice file to S3. Thanks for your prompt fix.

Neal

palafranchise commented 6 years ago

Glad to hear that it's working! Would love to see your YouTube demo once it's done. Please let me know if you have any other questions/issues.

Cheers,

Andrew

NealWalters commented 6 years ago

Created the video here: https://www.youtube.com/watch?v=_bynBpOVzi0 Neal

jritter716 commented 6 years ago

Hi, I am running into the 403 issue with latest code.