AWS | Simple Transcribe S3

This example demonstrates how to setup a lambda function to transcribe your audio file (.wav format) into a text transcription. The lambda will be triggered whenever a new audio file is uploaded to S3 and the transcription (JSON format) will be saved to a S3 bucket.

user  

Duong Tran

Clone This Example

Step #1 - npm install serverless -g
Step #2 - serverless install -u https://github.com/serverless/examples/tree/master/aws-node-simple-transcribe-s3 -n  aws-node-simple-transcribe-s3

Simple AWS Transcribe example in NodeJS

This example demonstrates how to setup a lambda function to transcribe your audio file (.wav format) into a text transcription. The lambda will be triggered whenever a new audio file is uploaded to S3 and the transcription (JSON format) will be saved to a S3 bucket.

Use Cases

  • Transcribe your audio file (voice messages, phone recordings) to text using AWS Transcribe

Setup

  • Edit serverless.yml and change the language code if you need to, at the moment: en-US | es-US | en-AU | fr-CA | en-UK is supported

  • Declare AWS region if you need to, beware that at the moment, AWS Transcribe is not supported for all regions.

Deploy

In order to deploy the you endpoint simply run

serverless deploy

The expected result should be similar to:

Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service .zip file to S3 (1.71 KB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
........................
Serverless: Stack update finished...
Service Information
service: aws-node-simple-transcribe-s3
stage: dev
region: us-east-1
stack: aws-node-simple-transcribe-s3-dev
api keys:
  None
endpoints:
  None
functions:
  transcribe: aws-node-simple-transcribe-s3-dev-transcribe

Usage

  • Upload a audio file to your S3 audio bucket
  • A transcription job should be created in AWS Transcribe
  • The result (in JSON format) should then be found in the S3 transcription bucket
view on Github

Latest commit b2f54ec on Sep 24, 2017

New to serverless?

To get started, pop open your terminal & run:

npm install serverless -g