This experiment demonstrates how to use AWS services to convert speech from an audio file to text using AWS Transcribe and S3 Event Trigger with Lambda and CloudWatch.
Before starting, you will need:
- An AWS account
- Basic knowledge of AWS services like S3, Lambda, and CloudWatch
The architecture of the experiment is as follows:
To run this experiment, follow these steps:
- Clone or download the GitHub repository containing the source code for the project.
- Navigate to the speech-to-text-lambda folder in the project.
- Create an S3 bucket in your AWS account if you haven't already done so.
- Upload an audio file to the S3 bucket you just created.
- Open the AWS Management Console and navigate to the Lambda service.
- Click on the "Create function" button.
- Choose "Author from scratch", give your function a name, select "Python 3.7" as the runtime and choose an existing role or create a new one.
- Click "Create function".
- In the "Function code" section, copy the code from the lambda_function.py file in the repository and paste it into the code editor.
- Replace the BUCKET_NAME variable value with the name of the S3 bucket you created in step 3.
- Click on the "Deploy" button.
- Navigate to the S3 service and select the bucket you created in step 3.
- Click on the "Properties" tab and then click on the "Events" button.
- Click on the "Add notification" button and configure the S3 event trigger as follows:
- Event type: "All object create events"
- Prefix: leave this field blank
- Suffix: ".mp3" (replace with the file extension of your audio file)
- Send to: "Lambda function"
- Lambda function: select the Lambda function you created in step 7
- Click on "Save"
- Once the transcription job is complete, you can view the transcribed text in the AWS Transcribe console.
In this experiment, we've demonstrated how to use AWS Transcribe and S3 Event Trigger with Lambda and CloudWatch to convert speech from an audio file to text. This could be useful for a variety of applications, such as transcribing lectures, podcasts, or interviews.
Linkedin Article Link : https://www.linkedin.com/pulse/serverless-speech-to-text-aws-transcribe-s3-event-using-konathala