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.

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'],
    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"],
    "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',
  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>