symfony/ai-eleven-labs-platform
Symfony AI bridge for the ElevenLabs Platform API. Provides integration for ElevenLabs authentication plus text-to-speech (convert/stream) and speech-to-text endpoints, enabling voice generation and transcription in Symfony applications.
guzzlehttp/guzzle) with custom wrappers.coqui-ai/TTS, microsoft/edge-tts).vosk, whisper.cpp).For Executives: *"This package enables us to integrate ElevenLabs’ cutting-edge voice AI with minimal engineering effort, unlocking features like personalized voice notifications, real-time transcription, or accessibility tools—without building from scratch. By embedding it into our Symfony stack, we can:
For Engineering/Tech Leads:
*"The symfony/ai-eleven-labs-platform package is a production-ready, type-safe wrapper for ElevenLabs’ TTS/STT APIs, built on Symfony’s AI platform. Key benefits:
HttpClient (connection pooling, retries).For Developers: *"This is a clean, opinionated client for ElevenLabs’ API, designed to work seamlessly with Symfony’s AI components. Here’s how to use it:
composer require symfony/ai-eleven-labs-platform
use Symfony\AI\ElevenLabs\ElevenLabsClient;
use Symfony\AI\ElevenLabs\Voice;
$client = new ElevenLabsClient('YOUR_API_KEY');
$voice = new Voice('Rachel'); // ElevenLabs voice ID
$audio = $client->convert('Hello, world!', $voice);
file_put_contents('output.mp3', $audio->getContent());
$stream = $client->stream('Hello, world!', $voice);
while ($chunk = $stream->getChunk()) {
// Process audio chunk (e.g., send to browser via SSE)
}
$transcription = $client->transcribe('audio.mp3');
echo $transcription->getText();
Key Features:
ElevenLabsClient or extend AbstractProvider for custom logic.HttpClient, Messenger, and AIPlatformInterface.
Gotchas:ElevenLabsApiException) for API failures.
Next Steps:How can I help you explore Laravel packages today?