Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

update sample App to use the new AWS SDK client #36

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,25 @@ This demo app uses browser microphone input and client-side JavaScript to demons

Check out the [Amazon Transcribe WebSocket docs](https://docs.aws.amazon.com/transcribe/latest/dg/websocket.html).

**Note**: This sample uses the [AWS SDK v3](https://github.com/aws/aws-sdk-js-v3) that is currently in preview. If you plan to use the AWS SDK v3 in your
project, please be aware of the possible breaking change. If you have feedbacks to JS SDK client, please [open an issue on the SDK repository](https://github.com/aws/aws-sdk-js-v3/issues/new/choose).

## Building and Deploying

[![amplifybutton](https://oneclick.amplifyapp.com/button.svg)](https://console.aws.amazon.com/amplify/home#/deploy?repo=https://github.com/aws-samples/amazon-transcribe-websocket-static)

Even though this is a static site consisting only of HTML, CSS, and client-side JavaScript, there is a build step required. Some of the modules used were originally made for server-side code and do not work natively in the browser.

We use [browserify](https://github.com/browserify/browserify) to enable browser support for the JavaScript modules we `require()`.

1. Clone the repo
2. run `npm install`
3. run `npm run-script build` to generate `dist/main.js`.

Once you've bundled the JavaScript, all you need is a webserver. For example, from your project directory:
1. run `yarn`

```
npm install --global local-web-server
ws
```
1. run `yarn start`. This command will automatically load the sample app in your browser.

### Credits

This project is based on code written by Karan Grover from the Amazon Transcribe team, who did the hard work (audio encoding, event stream marshalling).

## License

This library is licensed under the Apache 2.0 License.
This library is licensed under the Apache 2.0 License.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h1>
</a>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="dist/main.js"></script>
<script src="main.js"></script>
</body>

</html>
121 changes: 0 additions & 121 deletions lib/aws-signature-v4.js

This file was deleted.

Loading