Serverless · Freelance

Event-driven Call-Recording Transcoding and Transcription

S3-triggered Lambdas unzip batches of WAV recordings, transcode to MP3, transcribe, and write results to a relational database.

  • S3
  • Lambda
  • Elastic Transcoder
  • Amazon Transcribe
  • SNS
  • MySQL
  • Python / boto3

// Overview

A zip of recordings plus a CSV manifest landing in S3 triggers a start Lambda. It de-duplicates the manifest, extracts the audio, matches rows to files, creates transcoder and transcription jobs and invokes a finish Lambda asynchronously. The finish Lambda inserts call and transcript rows and updates them as jobs complete. Status is published to SNS.

// The problem

Large batches of raw recordings had to be compressed, transcribed and linked to call metadata with no manual processing.

// Flow

Event-driven Call-Recording Transcoding and Transcription flow1. S3 upload → 2. Manifest load → 3. Unzip → 4. Match → 5. Transcode → 6. Transcribe → 7. Hand-off → 8. DB insert → 9. Completion events → 10. Status01S3 upload02Manifest load03Unzip04Match05Transcode06Transcribe07 · GATEHand-off08DB insert09Completion events10Status
  1. S3 uploadzip and CSV manifest trigger the start Lambda (prefix/suffix filtered)
  2. Manifest loadpolling with retry, then de-duplication
  3. UnzipWAV files extracted and written back to S3
  4. Matchmetadata rows associated with audio files
  5. Transcodeone job per file to MP3, 3 retries
  6. Transcribeone speech-to-text job per file, JSON to S3
  7. Hand-off gateasync invoke of the finish Lambda with job-id maps
  8. DB insertcall and transcript records written
  9. Completion eventsjob state updates the audio path and transcript, then cleans temporary JSON
  10. Statussuccess or error published to SNS

// Design decisions & guardrails

  • Lambda-to-Lambda async invoke decouples long-running work.
  • Retry and backoff absorb eventual-consistency delays.
  • Job-id correlation tables instead of waiting on jobs.
  • Configurable bitrate presets.

// Outcome

Hands-off batch processing from upload to queryable transcripts.

// Related