Skip to content
court-record-transcriber logo

Court Recording Transcriber Development Guide

court-record-transcriber

Development skill for CaseMark's Court Recording Transcriber - an AI-powered application for transcribing court recordings with speaker identification, synchronized playback, search, and legal document exports. Built with Next.js 16, PostgreSQL, Drizzle ORM, wavesurfer.js, and Case.dev APIs. Use ...

SKILL.md

Full skill instructions

Court Recording Transcriber Development Guide

An AI-powered application for transcribing court recordings with speaker identification, synchronized playback, search functionality, and professional legal document exports.

Live site: https://court-record-transcriber.casedev.app

Architecture

src/
├── app/
│   ├── api/​recordings/         # API routes for recordings
│   │   ├── route.ts            # List, create recordings
│   │   └── [id]/
│   │       ├── route.ts        # Get, update, delete
│   │       ├── transcribe/     # Start transcription
│   │       └── export/         # Export endpoints
│   ├── upload/                 # Upload page
│   └── recording/[id]/         # Transcript viewer page
├── components/
│   ├── ui/                     # shadcn/​ui components
│   ├── AudioPlayer.tsx         # Waveform + playback
│   ├── TranscriptView.tsx      # Transcript display
│   ├── SpeakerEditor.tsx       # Label speakers
│   └── ExportDialog.tsx        # Export options
└── lib/
    ├── db/
    │   ├── index.ts            # Database connection
    │   └── schema.ts           # Drizzle schema
    ├── casedev/                # Case.dev API client
    └── legal-vocabulary.ts     # Word boosting config

Core Workflow

Upload Audio → Transcribe → Identify Speakers → Review/​Edit → Export
     ↓             ↓              ↓                ↓            ↓
  MP3/​WAV     Case.dev API    Auto-detect      Sync playback   PDF/​Word/
  M4A/​etc     with legal      Judge, Atty,    click-to-seek   Plain text
              vocabulary      Witness, etc

Tech Stack

LayerTechnology
FrontendNext.js 16, React 19, Tailwind CSS
BackendNext.js API Routes
DatabasePostgreSQL + Drizzle ORM
Audiowavesurfer.js
TranscriptionCase.dev Speech-to-Text API
ExportReact PDF, docx library

Key Features

FeatureDescription
Audio UploadDrag-drop MP3, WAV, M4A, FLAC, OGG
AI TranscriptionCase.dev API with legal vocabulary boosting
Speaker IDAuto-detect speakers, customizable labels
Synced PlaybackClick transcript line to jump to timestamp
SearchFind words/​phrases with highlighting
ExportPDF, Word (.docx), plain text with legal formatting

Database Operations

PostgreSQL with Drizzle ORM. See references/​database-schema.md.

Commands

npm run db:push      # Push schema (dev)
npm run db:generate  # Generate migrations
npm run db:studio    # Open Drizzle Studio

Core Tables

  • recordings: id, filename, duration, status, audioUrl
  • transcripts: id, recordingId, content (JSON), speakerMap
  • utterances: id, transcriptId, speaker, text, startTime, endTime

Case.dev Integration

See references/​casedev-transcription-api.md for API patterns.

Transcription Flow

// 1. Upload audio to Case.dev
const { audioId } = await uploadAudio(file);

// 2. Start transcription with legal vocabulary
const { jobId } = await startTranscription(audioId, {
  vocabulary: legalVocabulary,
  speakerDiarization: true,
});

// 3. Poll for completion
const transcript = await pollTranscriptionStatus(jobId);

// 4. Store results
await saveTranscript(recordingId, transcript);

Audio Playback

See references/​audio-playback.md for wavesurfer.js patterns.

Key Features

  • Waveform visualization
  • Click-to-seek from transcript
  • Playback speed control
  • Keyboard shortcuts (space, arrows)

Development

Setup

npm install
cp .env.example .env.local
# Add CASEDEV_API_KEY and DATABASE_URL
npm run db:push
npm run dev

Environment

CASEDEV_API_KEY=sk_case_...       # Case.dev API key
DATABASE_URL=postgresql://...     # PostgreSQL connection
NEXT_PUBLIC_APP_URL=http://localhost:3000

Common Tasks

Adding a New Export Format

  1. Create export function in lib/​export/
  2. Add endpoint in app/​api/​recordings/[id]/​export/
  3. Add option to ExportDialog.tsx

Customizing Speaker Labels

// Default labels
const speakerLabels = ['Judge', 'Plaintiff Attorney', 'Defense Attorney', 
                       'Witness', 'Clerk', 'Unknown'];

// In SpeakerEditor component, allow custom labels

Adding Legal Vocabulary

// lib/​legal-vocabulary.ts
export const legalVocabulary = [
  'objection', 'sustained', 'overruled', 'plaintiff', 'defendant',
  'voir dire', 'habeas corpus', 'pro bono', 'amicus curiae',
  // Add more terms
];

Export Formats

FormatUse Case
PDFOfficial court filing, archive
Word (.docx)Editing, annotations
Plain TextProcessing, search indexing
SRTSubtitles for video recordings

Troubleshooting

IssueSolution
Transcription stuckCheck Case.dev API status, verify audio format
Audio won't playVerify audio URL accessible, check CORS
Speaker labels wrongUse SpeakerEditor to reassign
Export failsCheck transcript exists, verify format support
Waveform not showingEnsure wavesurfer.js loaded, check audio src

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View