Download the PHP package aisdk/elevenlabs without Composer
On this page you can find all versions of the php package aisdk/elevenlabs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aisdk/elevenlabs
More information about aisdk/elevenlabs
Files in aisdk/elevenlabs
Package elevenlabs
Short Description ElevenLabs generative media provider for the PHP AI SDK.
License MIT
Homepage https://github.com/phpaisdk/elevenlabs
Informations about the package elevenlabs
aisdk/elevenlabs
Official ElevenLabs generative-media provider for the PHP AI SDK.
Installation
Configuration
Set ELEVENLABS_API_KEY, or configure the provider directly:
ELEVENLABS_BASE_URL overrides the default base URL when no baseUrl option is supplied.
Supported SDK Capabilities
| Capability | Support |
|---|---|
| Speech generation | Native |
| Transcription | Native |
| Realtime transcription | Native through Live::transcribe() |
| Text, image, embeddings, video | Not provided by this package |
Model IDs are opaque. Use the ElevenLabs model identifier appropriate for the operation, such as eleven_flash_v2_5, eleven_v3, or scribe_v2.
Provider-owned extensions cover the direct ElevenLabs creative-media APIs that do not belong in core:
| Extension | Surface |
|---|---|
| Voice changer and isolation | Audio-to-audio transforms |
| Voice design | Design previews, remix a voice, and save a selected generated preview |
| Music | Compose, composition plans, detailed output, video-to-music, upload, and stem separation |
| Sound effects and dialogue | Text-to-audio generation, including dialogue timestamps |
| Dubbing | Create a dub, inspect its status, and retrieve dubbed media or transcripts |
| Forced alignment | Align supplied audio and transcript text |
These extensions are available from either the configured provider instance or the static facade:
Speech Generation
Voice IDs are an ElevenLabs requirement, so provide one using the portable voice() method.
Use providerOptions('elevenlabs', ...) for documented ElevenLabs request fields such as apply_text_normalization, language_code, seed, and pronunciation dictionaries. Set output_format there when an ElevenLabs-specific output format is needed.
The adapter sends output_format, enable_logging, and the deprecated
optimize_streaming_latency field as query parameters, while keeping voice
settings and generation controls in the JSON request body, matching the
ElevenLabs API contract.
Transcription
Realtime Transcription
Scribe v2 Realtime uses the core Live API. Install aisdk/transport for the ready-made WebSocket transport:
aisdk/transport is optional. Without it, pass any application transport implementing AiSdk\Live\Contracts\TransportInterface; provider event encoding and normalization still come from this package.
For a browser connection, create a short-lived single-use token on your server and return only its value to your authenticated client:
The browser connects natively to ElevenLabs using that token. Never expose the workspace API key to client-side code.
When include_timestamps=true, the ordinary committed transcript is
normalized as TranscriptCompleted; the following
committed_transcript_with_timestamps message remains available as a raw
ProviderEvent, preserving ElevenLabs word metadata without duplicating the
portable completion event.
ElevenLabs Media Services
These capabilities are intentionally provider-owned instead of being added to aisdk/core.
Voice Changer
Voice Isolator
Music and Sound Effects
Music also supports composition plans and detailed metadata without opting into an HTTP streaming variant:
Direct music transforms use typed Content inputs:
music()->upload() uploads source audio for ElevenLabs composition-plan and inpainting workflows and returns its typed song ID, optional plan, and optional word timestamps.
Text to Dialogue
Use withTimestamps() when character alignment and per-voice segments are needed:
Voice Design and Remixing
Voice design is a two-step generation flow: generate previews, then save the selected preview as a usable voice.
To transform an eligible existing voice instead, call voiceDesign()->remix($voiceId, $description, $options) and save one of its generated previews in the same way.
Dubbing
Create a dub from local audio/video or from a URL-backed Content value, inspect the asynchronous job, then retrieve the output:
Forced Alignment
Scope
This package deliberately stays on the direct generative/media surface.
| Included | Deliberately excluded |
|---|---|
| TTS, batch STT, and realtime Scribe | ElevenAgents and its telephony/runtime management APIs |
| Voice changer, isolation, design, and remixing | Voice-library browsing, cloning/training, and general voice CRUD |
| Music generation and direct music transforms | Music finetune, asset/history, and marketplace management |
| Sound effects and text-to-dialogue | Studio, Audio Native, Flows, and project/editor management |
| Dubbing creation and result retrieval | Dubbing Studio resource editing, listing, and deletion |
| Forced alignment | Account, workspace, API-key, billing, analytics, and administrative APIs |
Saving a generated voice preview is included because it is the required second step of the Voice Design and Remix APIs. Pronunciation-dictionary management, AI-audio detection, human production services, and HTTP streaming variants of otherwise one-shot media endpoints are outside this package surface. Core realtime transcription remains fully supported through Live::transcribe().
Testing
The default suite is fixture- and conformance-based. Credentialed Live network
verification is separate and is not run by composer test.
Documentation
Community
- Contributing
- Support
- For private security reports, email [email protected].