ElevenLabs patch
1. Install and configure
Install the elevenlabs extra, then set both TEENAGEWORKS_API_KEY and the ElevenLabs credential used by your application. The provider credential remains necessary for calls that pass through.
python -m pip install "teenageworks[elevenlabs]"2. Patch before creating the client
from teenageworks import patch_elevenlabs
patch_elevenlabs()3. Keep the existing ElevenLabs call
from elevenlabs.client import ElevenLabs
client = ElevenLabs()
chunks = client.text_to_speech.convert(
voice_id="provider-voice-id",
text="This call is routed to Teen V1.",
model_id="eleven_multilingual_v2",
output_format="mp3_44100_128",
)Use a TeenageWorks voice ID directly, or pass reference_audio and reference_audio_format to clone a voice. For a clone, the provider voice ID is ignored.
teen-v1, models beginning with eleven_, and the omitted provider default route to TeenageWorks. Unknown custom model IDs pass through to ElevenLabs.
The patch covers tested synchronous and asynchronous convert() and stream() methods, supported persistent text-input sockets, and raw-response variants.
