Skip to content

Fmacmak/amazon-transcribe-parser

Repository files navigation

Amazon Transcribe Parser

Small toolset for converting downloaded Amazon Transcribe JSON into a clean speaker-separated transcript.

This repo includes:

  • A web app (Vite + React + TypeScript) where you paste JSON directly.
  • A CLI you can run as npx amazon-transcribe-parser.

What JSON this supports

Use the raw JSON output downloaded from Amazon Transcribe job results.

The parser reads:

  • results.audio_segments + results.items (primary path)
  • results.speaker_labels.segments + results.items (fallback)

Web App Usage

  1. Install deps:
npm install
  1. Start the app:
npm run dev
  1. Open the local URL shown by Vite.
  2. Paste the downloaded Amazon Transcribe JSON.
  3. Click Parse Transcript.
  4. Optionally rename speaker labels (spk_0, spk_1, ...).
  5. Copy all text or download transcript.txt.

CLI Usage

Run with NPX:

npx amazon-transcribe-parser --input ./transcribe-output.json

If no --speaker mapping is provided and you're in an interactive terminal, the CLI prompts you to name each detected speaker.

Options

  • -i, --input, --source <path>: source Amazon Transcribe JSON file.
  • -s, --speaker <spk=name>: rename speaker IDs, repeatable.
  • -o, --output <path>: write parsed transcript to file instead of stdout.
  • --list-speakers: print detected speaker IDs and exit.
  • --no-interactive: disable prompts.
  • -h, --help: show help.

Examples

Identify source file only:

npx amazon-transcribe-parser --input ./call.json

Identify speakers explicitly:

npx amazon-transcribe-parser \
  --input ./call.json \
  --speaker spk_0=Agent \
  --speaker spk_1=Customer

Save output to file:

npx amazon-transcribe-parser --input ./call.json --output ./transcript.txt

List speaker IDs first:

npx amazon-transcribe-parser --input ./call.json --list-speakers

Local CLI run (this repo)

npm run cli -- --input ./call.json

Output format

The parser outputs entries like:

[00:01.4 -> 00:05.8] Agent:
Hello, thanks for calling.

[00:05.9 -> 00:08.2] Customer:
Hi, I need help with my order.

About

Convert Amazon Transcribe JSON into a clean speaker-separated transcript

Topics

Resources

Stars

Watchers

Forks

Contributors