Implementation:Elevenlabs Elevenlabs python ProjectExternalAudioResponseModel
| Metadata | Value |
|---|---|
| source | Elevenlabs_Elevenlabs_python |
| domain | Projects, Audio, Dubbing |
| last_updated | 2026-02-15 |
Overview
Description: ProjectExternalAudioResponseModel is a Pydantic model that represents an external audio asset within an ElevenLabs project. It contains audio file metadata including identity (external audio ID, filename), timing properties (offset, duration, start/end times), audio processing settings (volume gain, muting, fade in/out), track assignment, source provenance (source audio ID, source asset ID), and processing state (speech import progress, dub audio progress, pending blocks, current snapshot).
Usage: This model is returned by the ElevenLabs Projects API when working with external audio files that have been imported into a dubbing or content project. It provides the information needed to manage, position, and process external audio tracks alongside video content within the project timeline.
Code Reference
Source file: src/elevenlabs/types/project_external_audio_response_model.py
Class signature:
class ProjectExternalAudioResponseModel(UncheckedBaseModel):
...
Import statement:
from elevenlabs.types import ProjectExternalAudioResponseModel
I/O Contract
| Field | Type | Required | Description |
|---|---|---|---|
| external_audio_id | str | Yes | Unique identifier for the external audio |
| filename | str | Yes | Name of the audio file |
| signed_url | str | Yes | Signed URL for accessing the audio file |
| offset_ms | int | Yes | Offset of the audio in milliseconds |
| duration_ms | int | Yes | Duration of the audio in milliseconds |
| start_time_ms | int | Yes | Start time of the audio in milliseconds |
| end_time_ms | int | Yes | End time of the audio in milliseconds |
| order | str | Yes | Ordering key for the audio in the project |
| track_id | str | Yes | ID of the associated track |
| created_at_ms | int | Yes | Creation timestamp in milliseconds |
| updated_at_ms | int | Yes | Last update timestamp in milliseconds |
| volume_gain_db | Optional[float] | No | Volume gain in decibels |
| muted | Optional[bool] | No | Whether the audio is muted |
| fade_in_ms | Optional[int] | No | Duration of the fade-in effect in milliseconds |
| fade_out_ms | Optional[int] | No | Duration of the fade-out effect in milliseconds |
| source_external_audio_id | Optional[str] | No | ID of the source external audio if derived |
| source_asset_id | Optional[str] | No | ID of the source asset if derived |
| pending_block_ids | List[str] | Yes | List of pending processing block IDs |
| import_speech_progress | Optional[float] | No | Progress of speech import (0.0 to 1.0) |
| speech_imported | Optional[bool] | No | Whether speech has been imported |
| dub_audio_progress | Optional[float] | No | Progress of audio dubbing (0.0 to 1.0) |
| current_snapshot_id | Optional[str] | No | ID of the current snapshot |
Usage Examples
from elevenlabs.types import ProjectExternalAudioResponseModel
# Working with an external audio response from the API
audio = ProjectExternalAudioResponseModel(
external_audio_id="ext_abc123",
filename="background_music.mp3",
signed_url="https://storage.example.com/signed/audio.mp3",
offset_ms=0,
duration_ms=120000,
start_time_ms=0,
end_time_ms=120000,
order="0001",
track_id="track_001",
created_at_ms=1700000000000,
updated_at_ms=1700000000000,
pending_block_ids=[],
volume_gain_db=-3.0,
fade_in_ms=2000,
fade_out_ms=3000,
)
# Check audio properties
print(f"Audio: {audio.filename}")
print(f"Duration: {audio.duration_ms / 1000}s")
print(f"Track: {audio.track_id}")
# Check processing state
if audio.speech_imported:
print("Speech has been imported")
if audio.dub_audio_progress is not None:
print(f"Dub progress: {audio.dub_audio_progress * 100}%")