Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pinkyjie/aws-transcribe-demo
A simple AWS demo utilises Amazon Transcribe to convert audio to text and analyse.
https://github.com/pinkyjie/aws-transcribe-demo
audio aws aws-cdk aws-lambda aws-transcribe semantic-ui typescript
Last synced: 17 days ago
JSON representation
A simple AWS demo utilises Amazon Transcribe to convert audio to text and analyse.
- Host: GitHub
- URL: https://github.com/pinkyjie/aws-transcribe-demo
- Owner: PinkyJie
- Created: 2018-10-24T12:13:05.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T20:48:03.000Z (almost 2 years ago)
- Last Synced: 2024-10-15T14:34:07.334Z (29 days ago)
- Topics: audio, aws, aws-cdk, aws-lambda, aws-transcribe, semantic-ui, typescript
- Language: TypeScript
- Size: 20.8 MB
- Stars: 45
- Watchers: 5
- Forks: 22
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AWS Transcribe demo
A simple AWS demo utilizes Amazon Transcribe to convert audio to text and do analyze. [Demo site](https://d3f4959s1jbc2u.cloudfront.net/)
> Please consider to [sponsor this project](https://github.com/sponsors/PinkyJie) for the AWS expenses.
![](./frontend.png)
## Deploy to your own AWS
- Setup AWS CLI and credential configuration (`aws configure`).
- Run `yarn` to install all dependencies.
- Run `yarn build` to build both front end and back end.
- Run `yarn bootstrap` to initialize AWS CDK deployment.
- Run `yarn deploy` to do the actual deployment.If the deployment is successful, the cloudfront URL will be displayed in the output like:
```bash
Outputs:
AwsTranscribeDemoStack.CloudFrontURL = xxx.cloudfront.net
```## CI/CD with Github Actions
- Sign up [Github Actions](https://github.com/features/actions) as a beta user.
- Save your AWS credential and region in Github repo's secret (`[YOUR_REPO_URL]/settings/secrets`)
- `AWS_DEFAULT_REGION`: region name
- `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`
- Every push will trigger a build/deploy to AWS, check your repo's "Actions" tab for details.## Behind the scenes
![](./aws-architecture.png)
- Static website built by React and hosted on S3.
- Upload audio file via website (click upload button):
- Call `GetToken` Lambda function via API gateway to get pre-signed URL for Audio File bucket.
- Use S3 JS SDK to upload audio file directly to S3 with the pre-signed URL returned above.
- Newly uploaded audio file will trigger `NewAudio` Lambda function which will:
- Create a record in DynamoDB
- Publish the record ID to `NewAudio` Topic in SNS
- SNS will trigger `TranscribeAudio` Lambda function to submit audio transcription job via Amazon Transcribe service API
- Check audio transcription status via website (click search button):
- Call `GetAudios` Lambda function via API gateway to get transcription status
- After getting record ID from DB, check the corresponding transcription job via Amazon Transcribe service API.
- If the job is ready, update the result URL to DB and return it to frontend.
- If the job is still processing, do nothing.