Skip to main content

Overview

The Audio Recap component converts your study materials into audio summaries, perfect for reviewing content during commutes, workouts, or when visual reading isn’t practical. Supports multiple voices and languages. When topic is set and folders are included, generation can narrow folder-derived materials toward that topic (best-effort). Use excludedMaterialIds to omit specific materials that would otherwise be included from selected folders; IDs listed here are ignored if the same material is also listed in materials (explicit selections win).
How much source material fits per length. When you generate a recap from materials without a topic, the selected materials are split evenly across the recap up to an approximate source-content budget for the chosen length — anything beyond it is truncated. Set a topic to prioritize the most relevant content instead of having it split evenly. The longer the recap (duration), the more source material it can include:
Lengthduration (min)Approx. source material
Short3~100 KB
Medium6~250 KB
Long12~250 KB
Extended24~400 KB
Complete30~400 KB
Ultra45~500 KB
If your materials exceed the budget for the length you picked, either use a longer duration or set a topic so the most relevant content is kept.

Creating an Audio Recap Component

import StudyfetchSDK from '@studyfetch/sdk';

const client = new StudyfetchSDK({
  apiKey: 'your-api-key',
  baseURL: 'https://studyfetchapi.com',
});

const audioComponent = await client.v1.components.create({
  name: 'Biology Chapter Audio Summary',
  type: 'audio_recap',
  config: {
    materials: ['mat-123', 'mat-456'],
    folders: ['folder-789'],
    excludedMaterialIds: ['mat-skip-from-folder'],
    recapType: 'SUMMARY',
    duration: 10,
    numParts: 3,
    isMultiVoice: true,
    voice1: 'Puck',
    voice2: 'Aoede',
    model: 'gpt-4.1-2025-04-14',
    topic: 'Cell Biology',
    theme: 'Educational podcast style'
  }
});

console.log('Audio recap component created:', audioComponent._id);

Configuration Parameters

name
string
required
Name of the audio recap component
type
string
required
Must be "audio_recap"
config
object
required
Audio recap configuration object

Response

{
  "_id": "comp_202mno",
  "name": "Biology Chapter Audio Summary",
  "type": "audio_recap",
  "status": "processing",
  "config": {
    "materials": ["mat-123", "mat-456"],
    "folders": ["folder-789"],
    "excludedMaterialIds": ["mat-skip-from-folder"],
    "recapType": "SUMMARY",
    "duration": 10,
    "numParts": 3,
    "isMultiVoice": true,
    "voice1": "Puck",
    "voice2": "Aoede",
    "model": "gpt-4.1-2025-04-14",
    "topic": "Cell Biology",
    "theme": "Educational podcast style"
  },
  "createdAt": "2024-01-15T10:00:00Z",
  "updatedAt": "2024-01-15T10:00:00Z",
  "organizationId": "org_456def",
  "audioFile": {
    "url": null,
    "duration": null,
    "size": null
  }
}

Embedding This Component

Once you’ve created an Audio Recap component, you can embed it on your website using the embedding API.

Generate Embed URL

const embedResponse = await client.v1.components.generateEmbed(audioComponent._id, {
  // User tracking
  userId: 'user-456',
  studentName: 'Jane Smith',  // Student name for display
  groupIds: ['class-101', 'class-102'],
  sessionId: 'session-789',
  
  // Audio-specific features
  features: {
    enableTranscript: true,
    enableOutline: true,
    enableHistory: true
  },
  
  // Dimensions
  width: '100%',
  height: '400px',
  
  // Token expiry
  expiryHours: 24
});

Audio Recap-Specific Embedding Features

features.enableTranscript
boolean
default:"true"
Show synchronized transcript alongside the audio player
features.enableOutline
boolean
default:"true"
Display chapter markers and content outline for easy navigation
features.enableHistory
boolean
default:"true"
Remember playback position and show listening history

Embed in Your HTML

<iframe 
  src="https://embed.studyfetch.com/component/comp_202mno?token=..."
  width="100%"
  height="400px"
  frameborder="0"
  style="border: 1px solid #e5e5e5; border-radius: 8px;">
</iframe>