Documentation Index
Fetch the complete documentation index at: https://docs.case.dev/llms.txt
Use this file to discover all available pages before exploring further.
What You’ll Build
A complete deposition processing pipeline that:
- Transcribes audio with speaker identification
- Stores transcripts in a searchable vault
- Generates timelines of key testimony
- Cross-references witnesses to find contradictions
- Produces formatted impeachment reports
Time to complete: 30 minutes
Architecture
Prerequisites
- Case.dev API key (get one here)
- A vault for storing transcripts
- Deposition audio files (MP3, M4A, WAV, etc.)
Step 1: Set Up Your Vault
Create a vault to hold all deposition transcripts for a case:
casedev vault create --name "Smith v. Jones — Depositions"
Step 2: Upload and Transcribe a Deposition
Upload the audio file to your vault, then transcribe with speaker labels:
casedev vault upload \
--id $VAULT_ID \
--filename "document.pdf" \
--content-type "application/pdf"
Speaker labels are automatic. The transcription service identifies speakers by voice characteristics. Set speakers_expected for better accuracy when you know the number of participants.
Step 3: Store Transcript in the Vault
The vault-based transcription automatically stores the transcript. Now ingest it for semantic search:
casedev vault ingest --id $VAULT_ID --object-id $OBJECT_ID
For production, use webhooks instead of polling for both transcription and ingestion status changes.
Step 4: Batch Process Multiple Depositions
Process all depositions for a case in sequence:
# Process depositions sequentially
for AUDIO in depositions/*.mp3; do
WITNESS=$(basename "$AUDIO" .mp3)
echo "Processing: $WITNESS"
# Transcribe
casedev voice:transcription create \
--vault-id $VAULT_ID --file "$AUDIO" \
--speaker-labels --language en-US
# Index transcript is automatic when vault indexing is enabled
done
Step 5: Generate a Testimony Timeline
Search across all depositions and build a chronological timeline of events:
# Search vault for testimony, then pipe to LLM
casedev vault search --id $VAULT_ID \
--query "timeline of events" --method hybrid --limit 15
casedev llm:v1:chat create-completion \
--model anthropic/claude-sonnet-4.5 \
--message '{role: system, content: "Extract a chronological timeline from deposition testimony."}' \
--message '{role: user, content: "<testimony excerpts from search>"}' \
--temperature 0.2
Step 6: Find Contradictions Across Witnesses
Search for a topic and compare what different witnesses said:
# Search for testimony across witnesses
casedev vault search --id $VAULT_ID \
--query "accident description" --method hybrid --limit 20
# Analyze contradictions
casedev llm:v1:chat create-completion \
--model anthropic/claude-sonnet-4.5 \
--message '{role: system, content: "Identify contradictions and inconsistencies across witness testimony."}' \
--message '{role: user, content: "<grouped testimony from search>"}' \
--temperature 0.3
Step 7: Generate a PDF Impeachment Report
Combine the timeline and contradiction analysis into a formatted report:
casedev format:v1 document \
--content "# Report" \
--input-format md --output-format pdf
Complete Example
Putting it all together:
casedev vault create --name "Smith v. Jones — Depositions"
Example Contradiction Report
### Topic: When the CEO learned of the data breach
**CEO Johnson (Deposition, March 15, 2024):**
> "I was not informed of any security incident until July 15th,
> when our IT director called me at home."
**CTO Smith (Deposition, March 18, 2024):**
> "I sent an urgent email to the entire executive team, including
> the CEO, on July 12th explicitly detailing the intrusion and
> recommending immediate action."
**IT Director Williams (Deposition, March 20, 2024):**
> "The CTO instructed me to brief the CEO on July 12th. I called
> his office but was told he was unavailable. I left a detailed
> voicemail."
### Analysis
The CEO claims no knowledge until July 15th, but both the CTO and
IT Director indicate notification attempts on July 12th — three days
earlier. The CTO claims direct email notification, and the IT
Director confirms a voicemail was left.
### Impeachment Strategy
1. Introduce July 12th email as Exhibit A
2. Subpoena CEO's voicemail records for July 12th
3. Confront CEO with CTO and IT Director testimony
Production Tips
Error Handling
# CLI displays errors to stderr with status codes
casedev voice:transcription create --vault-id $VAULT_ID --object-id $AUDIO_OBJECT_ID
# Error: 413 Payload Too Large — split into segments
# Error: 429 Too Many Requests — retry after a delay
Use Webhooks in Production
Instead of polling, subscribe to events for transcription and ingestion completion:
# Subscribe to vault events
casedev vault:events:subscriptions create \
--id $VAULT_ID \
--callback-url "https://your-app.com/webhooks/vault" \
--event-type object.ingested \
--event-type object.failed
# Subscribe to transcription events
# Your webhook handler receives status updates automatically
For long depositions (2+ hours), transcription may take several minutes. Webhooks prevent wasted polling requests.
Next Steps