Skip to content

Commit 31d0ba1

Browse files
committed
Updated documentation and add .env.example file with the correct parameter names
1 parent efd924c commit 31d0ba1

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ var recognizeMic = require('watson-speech/speech-to-text/recognize-microphone');
3939

4040
This SDK _CAN_ be used in the browser with services that use IAM for authentication. This does require a server-side component - an endpoint used to retrieve the token. An example can be found [here](https://github.com/watson-developer-cloud/speech-javascript-sdk/blob/master/examples/server.js#L92).
4141

42+
In a local environment you should set only the TEXT_TO_SPEECH_IAM_APIKEY and SPEECH_TO_TEXT_IAM_APIKEY in your .env file, see example file [here](https://github.com/watson-developer-cloud/speech-javascript-sdk/blob/master/examples/.env.example).
43+
4244
Once that is set up, the token can be used in your SDK request with the parameter `access_token`. See [this example](https://github.com/watson-developer-cloud/speech-javascript-sdk/blob/master/examples/static/microphone-streaming.html#L36).
4345

4446
## Changes

examples/.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
SPEECH_TO_TEXT_IAM_APIKEY=""
2+
SPEECH_TO_TEXT_USERNAME=""
3+
SPEECH_TO_TEXT_PASSWORD=""
4+
TEXT_TO_SPEECH_IAM_APIKEY=""
5+
TEXT_TO_SPEECH_USERNAME=""
6+
TEXT_TO_SPEECH_PASSWORD=""

0 commit comments

Comments
 (0)