Implementation:Elevenlabs Elevenlabs python ChapterSnapshotExtendedResponseModel: Difference between revisions
Auto-imported from implementations/Elevenlabs_Elevenlabs_python_ChapterSnapshotExtendedResponseModel.md |
Sync from local file |
||
| Line 80: | Line 80: | ||
== Related Pages == | == Related Pages == | ||
* [[Elevenlabs_Elevenlabs_python_ChapterSnapshotResponse]] | * [[Implementation:Elevenlabs_Elevenlabs_python_ChapterSnapshotResponse]] | ||
* [[Elevenlabs_Elevenlabs_python_ChapterResponse]] | * [[Implementation:Elevenlabs_Elevenlabs_python_ChapterResponse]] | ||
[[Category:Implementations]] | [[Category:Implementations]] | ||
Latest revision as of 10:37, 27 September 2026
| Metadata | Value |
|---|---|
| source | Elevenlabs_Elevenlabs_python |
| domain | Projects, Audio Books, Snapshots |
| last_updated | 2026-02-15 |
Overview
Description: ChapterSnapshotExtendedResponseModel is a Pydantic model that extends the basic chapter snapshot data with detailed character alignment information. It includes the snapshot identity (snapshot ID, project ID, chapter ID), metadata (creation timestamp, name), and a list of character alignment models that map characters to their positions in the generated audio. This extended model supports detailed audio-text synchronization for chapter snapshots.
Usage: This model is returned when retrieving an extended chapter snapshot from the ElevenLabs Projects API. The character alignments data is useful for building features like synchronized text highlighting during audio playback, precise subtitle generation, and audio editing at the character level.
Code Reference
Source file: src/elevenlabs/types/chapter_snapshot_extended_response_model.py
Class signature:
class ChapterSnapshotExtendedResponseModel(UncheckedBaseModel):
...
Import statement:
from elevenlabs.types import ChapterSnapshotExtendedResponseModel
I/O Contract
| Field | Type | Required | Description |
|---|---|---|---|
| chapter_snapshot_id | str | Yes | The ID of the chapter snapshot |
| project_id | str | Yes | The ID of the project |
| chapter_id | str | Yes | The ID of the chapter |
| created_at_unix | int | Yes | The creation date of the chapter snapshot (Unix timestamp) |
| name | str | Yes | The name of the chapter snapshot |
| character_alignments | List[CharacterAlignmentModel] | Yes | Character-level alignment data mapping text to audio positions |
Usage Examples
from elevenlabs.types import ChapterSnapshotExtendedResponseModel
# Working with an extended chapter snapshot from the API
snapshot = ChapterSnapshotExtendedResponseModel(
chapter_snapshot_id="snap_abc123",
project_id="proj_xyz789",
chapter_id="ch_def456",
created_at_unix=1700000000,
name="Final revision",
character_alignments=[],
)
# Access snapshot metadata
print(f"Snapshot: {snapshot.name}")
print(f"Project: {snapshot.project_id}")
print(f"Chapter: {snapshot.chapter_id}")
# Iterate over character alignments for audio-text sync
for alignment in snapshot.character_alignments:
print(alignment)