|
1 | | -# Audio transcription with AWS Lambda and Amazon Transcribe |
| 1 | +# Subtitle generation with AWS Lambda and Amazon Transcribe |
2 | 2 |
|
3 | | -Using this sample pattern, users can securely upload images to an Amazon S3 bucket by requesting a pre-signed URL through Amazon API Gateway. This URL allows secure and temporary access for uploading files directly to S3. |
| 3 | +Using this sample pattern, users can securely upload videos to an Amazon S3 bucket by requesting a pre-signed URL through Amazon API Gateway. This URL allows secure and temporary access for uploading files directly to S3. |
4 | 4 |
|
5 | | -Once an audio file is uploaded, an S3 event invokes another Lambda function to start the Transcribe job using the StartTranscriptionJob API. Once the transcription is completed, the result will be stored in the output S3 bucket. |
| 5 | +Once a video file is uploaded, an S3 event invokes another Lambda function to start the Transcribe job using the StartTranscriptionJob API. Once the transcription is completed, the generated subtitles will be stored in the output S3 bucket. |
6 | 6 |
|
7 | 7 | Learn more about this pattern at Serverless Land Patterns: https://serverlessland.com/patterns/apigw-lambda-transcribe |
8 | 8 |
|
@@ -47,17 +47,17 @@ Important: this application uses various AWS services and there are costs associ |
47 | 47 | 1. Make a POST request to the API using the following cURL command: |
48 | 48 |
|
49 | 49 | ``` |
50 | | - curl --location 'API_ENDPOINT' --header 'Content-Type: application/json' --data '{"object_name": "audio.mp3", "content_type": "audio/mpeg"}' |
| 50 | + curl --location 'API_ENDPOINT' --header 'Content-Type: application/json' --data '{"object_name": "video.mp4", "content_type": "video/mp4"}' |
51 | 51 | ``` |
52 | 52 |
|
53 | | - Note: Replace `API_ENDPOINT` with the generated `api_endpoint` from Terraform (refer to the Terraform Outputs section) `object_name` with your desired name for the S3 object and `content_type` with the content type of the audio, for ex, mp3 or m4a |
| 53 | + Note: Replace `API_ENDPOINT` with the generated `api_endpoint` from Terraform (refer to the Terraform Outputs section) `object_name` with your desired name for the S3 object and `content_type` with the content type of the video, for ex, mp4. |
54 | 54 |
|
55 | 55 | 1. Get the pre-signed URL from the previous step and use the following cURL command to upload the object in S3: |
56 | 56 |
|
57 | 57 | ``` |
58 | | - curl -v --location -T "audio.mp3" \ |
| 58 | + curl -v --location -T "video.mp4" \ |
59 | 59 | 'PRESIGNED_URL' \ |
60 | | - --header 'Content-Type: audio/mpeg' |
| 60 | + --header 'Content-Type: video/mp4' |
61 | 61 | ``` |
62 | 62 |
|
63 | 63 | Note: Replace `PRESIGNED_URL` with pre-signed URL generated in the previous step. `Content-Type` should match the content type used to generate the pre-signed URL in the previous step. |
|
0 commit comments