0+
September 14, 2026
September 14, 2026
This plugin provides a third-party ElevenLabs integration for the PHP AI Client SDK. It enables WordPress sites to use ElevenLabs models for text-to-speech conversion and sound effects generation.
It is not affiliated with, endorsed by, or sponsored by ElevenLabs.
“LS” is the author’s initials, Lauri Saarni, because the WordPress.org plugin directory requires a plugin name to begin with a distinctive identifier rather than a generic description.
The plugin has no admin screens of its own. It registers ElevenLabs with the AI Client so that WordPress core and any other plugin built on the AI Client can use it, and it never contacts ElevenLabs until such a request is actually made. See “External services” below.
Features:
Available Capabilities:
TEXT_TO_SPEECH_CONVERSION — convert text to speech using any ElevenLabs TTS modelSPEECH_GENERATION — generate sound effects from text promptsRequirements:
This plugin relies on the ElevenLabs API (https://api.elevenlabs.io) to generate speech and sound. It is the service the plugin exists to integrate with, so the plugin cannot function without it. No request is ever made automatically: every one is the direct result of code on your site asking the AI Client for a generation or for provider metadata, and no request is made at all until an ElevenLabs API key is configured.
The following requests can be made, always over HTTPS and always with your ElevenLabs API key in the xi-api-key request header:
POST https://api.elevenlabs.io/v1/text-to-speech/{voice_id} — sent when text-to-speech conversion is requested. The text to be narrated, the selected voice ID and model ID, and any voice or output settings you configured are sent. Text longer than the model’s per-request character limit is sent as several requests, each also carrying the neighbouring text so the voice keeps its intonation across the split.POST https://api.elevenlabs.io/v1/sound-generation — sent when sound effect generation is requested. The text prompt describing the sound and any generation settings you configured are sent.GET https://api.elevenlabs.io/v1/models — sent when the list of available models is requested, to discover which models your account can use, and when your API key is verified so that the Connectors screen can report whether it works. Only your API key is sent. When the model listing fails, the plugin falls back to a built-in model list; the result of a key verification is cached for 15 minutes so the request is not repeated on every page load.GET https://api.elevenlabs.io/v2/voices — sent when the list of available voices is requested, including when a default voice has to be resolved automatically. Only your API key and pagination parameters are sent. The response is cached in a transient for 15 minutes per API key.The service is provided by ElevenLabs (https://elevenlabs.io/). Your use of it is governed by their terms and privacy policy:
/wp-content/plugins/ls-ai-provider-for-elevenlabs/ELEVENLABS_API_KEY environment variable or constantVisit https://elevenlabs.io/app/settings/api-keys to create an account and generate an API key. Using this plugin requires an ElevenLabs account, and ElevenLabs bills you for the requests it makes on your behalf.
No. This plugin contains only the ElevenLabs-specific implementation of the AI Client’s provider interfaces, so the SDK has to be loadable for it to do anything. WordPress 7.0 and later bundle the SDK in core. On earlier WordPress, the SDK has to be provided by your project (for example through Composer); it is a library, not a plugin. When the SDK is missing, this plugin registers nothing and stays inert instead of erroring.
Set the outputSpeechVoice option in your ModelConfig to the voice ID. You can discover available voices using the VoiceDirectory class or the ElevenLabs voice library.
The provider resolves a default: the ELEVENLABS_DEFAULT_VOICE_ID environment variable or constant, the ai_provider_for_elevenlabs_default_voice_id option, a voice discovered from your own ElevenLabs account (preferring premade voices; requires the Voices permission on the API key), and finally the premade voice “George” (JBFqnCBsd6RMkjVDRZzb), which is available on every account. The result passes through the ai_provider_for_elevenlabs_default_voice_id filter. An explicitly configured outputSpeechVoice always takes precedence.
Text longer than the model’s per-request character limit is split on paragraph and sentence boundaries, narrated in several requests, and returned as one audio file. Note that narration is slow (roughly 90 to 95 characters per second) and runs inside one PHP request, so very long text can exceed the PHP execution time limit. Each chunk is billed as its own API request. See the README for details and for the public per-chunk methods a background-processing plugin can build on.
The WordPress.org AI plugin treats a connector as valid only when it can generate text, and ElevenLabs generates speech and sound. The warning is expected and does not affect this provider; add a text-generation connector alongside it to satisfy the AI plugin’s own features.
The default output format is MP3 (mp3_44100_128). Other supported formats include PCM, ulaw, Opus, and AAC at various sample rates and bitrates. When long text has to be split across requests, only formats whose audio can be joined are allowed (MP3, PCM, ulaw, alaw).
No. Nothing leaves your site until code on your site asks the AI Client for speech, sound, a model list, or a voice list. There is no telemetry, no analytics, and no phone-home. The “External services” section below documents every request the plugin can make.
ls-ai-provider-for-elevenlabs. The WordPress.org plugin directory requires a plugin name to begin with a distinctive identifier, and “AI Provider” on its own is a generic description; “LS” is the author’s initialsls-ai-provider-for-elevenlabs.php and the text domain to ls-ai-provider-for-elevenlabs, both of which have to match the permalinkai_provider_for_elevenlabs_*) and the Composer package name (saarnilauri/ai-provider-for-elevenlabs) unchanged, so existing integrations and Composer installs are unaffectedconnectors_ai_elevenlabs_api_key) directly. WordPress passes the key to the AI Client itself, and the plugin already re-wraps it for the xi-api-key header ElevenLabs requires, so the direct read was redundant. This resolves a WordPress.org review finding about plugins handling AI Client credentialsplugin.php to ai-provider-for-elevenlabs.php, so the plugin headers live in the file matching the plugin slug as the WordPress.org directory expects. Sites that installed an earlier build from the GitHub ZIP have to reactivate the plugin once after updatingoutputSpeechVoice and no explicit default are configured, a voice is discovered from the account’s own voices, preferring premade ones, before falling back to “George” (contributed by Jake Spurlock)/v1/voices endpoint to /v2/voices with full pagination, and cache the voice list per API key for 15 minutes (contributed by Jake Spurlock)customOptions in both the text-to-speech and sound generation models (e.g. language_code, seed, speed, apply_text_normalization); previously most keys were silently dropped (contributed by Jake Spurlock)/models response, seeded from measured values, and add eleven_v3 to the fallback model list (contributed by Jake Spurlock).env, .wp-env.override.json) and dev artifacts from the release ZIP, verified by a CI canary check (contributed by Jake Spurlock)wp-env environment, the GPL-2.0 license text, and fix test-suite autoloading on case-sensitive filesystemsoutputFileType support for text-to-speech and sound generation models, so support checks like isSupportedForTextToSpeechConversion() pass when callers request inline output (fixes compatibility with the WordPress AI plugin’s Text to Speech experiment)outputSpeechVoice is configured, instead of throwing an exception; the default can be overridden via the ELEVENLABS_DEFAULT_VOICE_ID environment variable or constant, the ai_provider_for_elevenlabs_default_voice_id option, or the ai_provider_for_elevenlabs_default_voice_id filterconnectors_ai_elevenlabs_api_key, Settings > Connectors)