Key | Value |
---|---|
Environment | |
Services | Transcribe, S3, Lambda, SQS, SES |
Integrations | Serverless Framework, AWS CLI, Serverless Lift Pluglin, AWS SDK |
Categories | Serverless, Event-driven architecture, S3 Trigger, LocalStack developer endpoints |
Level | Intermediate |
Github | Repository link |
Our Transcription App is designed to simplify and streamline the process of transcribing audio files. With this app, you can upload your audio files and receive a transcript in a matter of minutes. Here's how it works:
-
Lambda Function Serves Frontend: When you navigate to our
ServiceEndpoint
, a lambda function will serve a user-friendly frontend. From there, you can choose to upload an audio file or view existing transcription jobs. -
Uploading Audio File and Triggering Transcription: When you select a file and click upload, the file will be uploaded to an S3 bucket, which will trigger a transcription job. The transcription job will convert the audio file into a transcription JSON file. The JSON file will then be uploaded to another S3 bucket.
-
Email Notification of Job Completion: Once the transcription job is complete and the transcription JSON is uploaded to S3, an email will be sent to the end user using SES (Simple Email Service) to notify them of the job completion. This email will contain the transcripted content of the audio file. You can use the SES developer endpoint to list messages that were sent via SES:
curl -s http://localhost.localstack.cloud:4566/_aws/ses
- Viewing and Downloading Transcription: To view and download the transcription, you can click on the "List Jobs" button on the frontend. This will display a list of all your completed transcription jobs, along with a link to download the transcription JSON file.
Our Transcription App leverages the power of AWS services such as Lambda, S3, Transcribe, and SES to provide you with a simple, efficient, and cost-effective solution for transcribing your audio files.
Here's an architecture diagram of the application:
You need few things installed on your machine before you can deploy the application on LocalStack:
- LocalStack Pro with the
localstack
CLI. - AWS CLI with the
awslocal
wrapper. - Serverless Framework.
- Serverless LocalStack Plugin
- Serverless Lift Plugin
- Node.js with
npm
package manager.
Start LocalStack Pro with the LOCALSTACK_API_KEY
pre-configured:
export LOCALSTACK_API_KEY=<your-api-key>
localstack start
If you prefer running LocalStack in detached mode, you can add the
-d
flag to thelocalstack start
command, and use Docker Desktop to view the logs.
You can build and deploy the sample application on LocalStack by running our Makefile
commands. Run make deploy
to create the infrastructure on LocalStack. Run make stop
to delete the infrastructure by stopping LocalStack.
To use the application, please follow the steps outlined below:
- Access the application’s user interface by visiting the
ServiceEndpoint
URL specified in the output of themake deploy
command; withupload
static route parameter; after deployemnt of the app, eg:https://vmvs1am212p.execute-api.localhost.localstack.cloud:4566/local/upload
.
- Click on the
Upload
button to upload a file; you can choose one on the files fromsample-audio-files
folder; to the designated S3 bucket (i.e.,aws-node-sample-transcribe-s3-local-records
). - Allow sufficient time for the Lambda function:
aws-node-sample-transcribe-s3-local-transcribe
to process the uploaded file. - The Lambda function will create a transcription job with the record uploaded in step 2 and push the resulting output JSON file to an S3 bucket (i.e.,
aws-node-sample-transcribe-s3-local-transcriptions
). - Upon completion of the file processing, the UI will display the transcription output. Click the
List all jobs
button to view it.
- The transcription can be downloaded by selecting the jobname.json link.
- To verify that the email has been sent correctly, use the internal LocalStack SES endpoint at
http://localhost.localstack.cloud:4566/_aws/ses
.