Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run the example #21

Open
zume2020 opened this issue Jan 27, 2020 · 3 comments
Open

How to run the example #21

zume2020 opened this issue Jan 27, 2020 · 3 comments

Comments

@zume2020
Copy link

I tried to run the example by node renderer.js but it returns this error,

aws-lex-browser-audio-capture-master\example\renderer.js:3
var canvas = document.querySelector('.visualizer');
^

ReferenceError: document is not defined
at D:\ralfe-speech\aws-lex-browser-audio-capture-master\example\renderer.js:3:16
at Object. (D:\ralfe-speech\aws-lex-browser-audio-capture-master\example\renderer.js:81:3)
�[90m at Module._compile (internal/modules/cjs/loader.js:959:30)�[39m
�[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)�[39m
�[90m at Module.load (internal/modules/cjs/loader.js:815:32)�[39m
�[90m at Function.Module._load (internal/modules/cjs/loader.js:727:14)�[39m
�[90m at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)�[39m
�[90m at internal/main/run_main_module.js:17:11�[39m

I'm running the script on Win10, v12.14.0 ,

@hectorfloresflores
Copy link

Hi, did you figure out how to do it?

@hectorfloresflores
Copy link

I was able to make it run, here it is my setup.
1.- run in terminal: npm install
2.- I have AWS for students so in order to work for me I had to add the session token here:
AWS.config.credentials = new AWS.Credentials(document.getElementById('ACCESS_ID').value, document.getElementById('SECRET_KEY').value,
'hardcode_here_your_session_token');

And just open index.html in your web browser and thats it!.

NOTE: If you have a normal account you do not have to do anything else, just step 1 and open index.html in web browser.
HAPPY CODING 👍

@zume2020
Copy link
Author

zume2020 commented Nov 3, 2020

I was able to make it run, here it is my setup.
1.- run in terminal: npm install
2.- I have AWS for students so in order to work for me I had to add the session token here:
AWS.config.credentials = new AWS.Credentials(document.getElementById('ACCESS_ID').value, document.getElementById('SECRET_KEY').value,
'hardcode_here_your_session_token');

And just open index.html in your web browser and thats it!.

NOTE: If you have a normal account you do not have to do anything else, just step 1 and open index.html in web browser.
HAPPY CODING

Happy to know that you fixed it!!
NB: I even don't remember this thing 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants