The problem: You have 50 hours of video depositions. You suspect the CEO contradicted the CTO on the breach timeline, but you can’t re-watch everything.
The solution: Transcribe the audio, search by topic, and use AI to find contradictions.
1. Transcribe the depositions
import Casedev from 'casedev';
const client = new Casedev({ apiKey: process.env.CASEDEV_API_KEY });
// Transcribe audio uploaded by your user
const job = await client.voice.transcription.create({
audio_url: audioUrl, // URL from your user's upload
speaker_labels: true, // Identify who's speaking
auto_chapters: true // Detect topic changes
});
console.log(`Transcription started: ${job.id}`);
2. Get the transcripts
// Wait for completion
async function waitForTranscription(jobId: string) {
let result = await client.voice.transcription.retrieve(jobId);
while (result.status !== 'completed') {
if (result.status === 'error') throw new Error('Transcription failed');
await new Promise(r => setTimeout(r, 10000));
result = await client.voice.transcription.retrieve(jobId);
}
return result;
}
const transcript = await waitForTranscription(job.id);
// Deliver speaker-labeled transcript to your user
for (const utterance of transcript.utterances) {
console.log(`${utterance.speaker}: ${utterance.text}`);
}
3. Store in a vault for search
Store transcripts in a vault so your users can search across multiple recordings:
// Create a vault for your user's transcripts
const vault = await client.vault.create({
name: 'Audio Transcripts - User 12345'
});
// Upload transcript as a searchable document
async function uploadTranscript(vaultId: string, name: string, text: string) {
const upload = await client.vault.upload(vaultId, {
filename: `${name}.txt`,
contentType: 'text/plain'
});
await fetch(upload.uploadUrl, {
method: 'PUT',
headers: { 'Content-Type': 'text/plain' },
body: text
});
await client.vault.ingest(vaultId, upload.objectId);
}
await uploadTranscript(vault.id, 'recording-001', transcript.text);
4. Find contradictions
Help your users extract insights from transcripts:
// Analyze transcript for your user
const analysis = await client.llm.v1.chat.createCompletion({
model: 'anthropic/claude-sonnet-4.5',
messages: [
{
role: 'system',
content: 'Summarize this transcript. Identify key points, action items, and any notable quotes.'
},
{
role: 'user',
content: transcript.text
}
]
});
// Return analysis to your user
console.log(analysis.choices[0].message.content);
Example output:
Build advanced features like contradiction detection for legal applications:
// Search for statements about a specific topic
const statements = await client.vault.search(vault.id, {
query: 'timeline of events on July 15th',
topK: 10
});
// Use AI to identify contradictions
const contradictions = await client.llm.v1.chat.createCompletion({
model: 'anthropic/claude-sonnet-4.5',
messages: [
{
role: 'system',
content: 'Analyze these statements and identify any contradictions. Cite specific quotes.'
},
{
role: 'user',
content: statements.chunks.map(c => c.text).join('\n\n')
}
]
});
console.log(contradictions.choices[0].message.content);
Time saved: What used to take days of re-watching video now takes minutes. The AI finds contradictions you might have missed.