@zooly/util-elevenlabs is a server-side utility package that provides ElevenLabs API integration for voice cloning and text-to-speech functionality. It handles voice management operations and audio generation.
This package is server-only and requires the ElevenLabs API key. It's used for creating voice clones and generating speech from text.
@zooly/util-elevenlabspackages/util-elevenlabsaddVoice - Create a voice clone in ElevenLabs from an audio blobdeleteVoice - Delete a voice clone from ElevenLabsgetVoice - Get voice details from ElevenLabsgenerateVoiceForText - Generate TTS audio using an ElevenLabs voice clone
eleven_multilingual_v2)High-level functions that combine ElevenLabs API operations with database persistence. These functions manage the full lifecycle of voice clones for accounts.
createAndPersistVoice - Create a voice clone in ElevenLabs and persist it to the database
eleven_labs tablecreateOrUpdateVoiceWithId - Create or update a voice record with an existing ElevenLabs voiceId
eleven_labs tablegetAccountVoices - Get all voices for an account
ElevenLabsVoice records from databasegetAccountVoice - Get a specific voice for an account
updateAccountVoiceExample - Update voice example URL
voiceExample field in database (typically S3 URL of TTS sample)deleteAccountVoice - Delete a voice clone (both from ElevenLabs and database)
deleteAllAccountVoices - Delete all voices for an account
getVoiceDetails - Get voice details from ElevenLabs API
createVoiceSample - Create a complete voice sample for likeness search assets
voiceSampleUrl in likeness_assets tablevoiceId to eleven_labs tablevoiceId and voiceSampleUrlpackages/util-elevenlabs/src/createVoiceSample.ts for implementation@elevenlabs/elevenlabs-js - Official ElevenLabs JavaScript SDK@zooly/app-db - Database access layer@zooly/types - Shared types@zooly/util-srv - Server-side utilities (S3 operations)@zooly/likeness-search - Voice tag generation and audio validation utilitiesuuid - UUID generation for S3 keysThis package provides a clean interface for ElevenLabs operations. It's used by:
See packages/util-elevenlabs/src/voice-management.ts for createAndPersistVoice implementation.
See packages/util-elevenlabs/src/voice-management.ts for getAccountVoices implementation.
See packages/util-elevenlabs/src/voice-management.ts for createOrUpdateVoiceWithId implementation.
See packages/util-elevenlabs/src/voice-management.ts for createOrUpdateVoiceWithId implementation.
See packages/util-elevenlabs/src/voice-management.ts for deleteAccountVoice implementation.
See packages/util-elevenlabs/src/createVoiceSample.ts for createVoiceSample implementation.
The package requires the following environment variable:
ELEVEN_LABS_API_KEY - ElevenLabs API key for authenticationOn This Page
OverviewPackage DetailsKey FeaturesCore FunctionalityVoice OperationsText-to-SpeechVoice Management (with Database Persistence)Voice Sample Creation (for Likeness Search)DependenciesUsageExample: Create and Persist VoiceExample: List Account VoicesExample: Create/Update Voice with Existing ID (VIP Voices)Example: Update Existing Voice RecordExample: Delete VoiceExample: Create Voice Sample for Likeness SearchEnvironment VariablesAPI Features