SDK
Text to speech
Provider patches
OpenAI patch
ElevenLabs patch
Patch parameters
Migration and troubleshooting

Migration and troubleshooting

Migration checklist

  1. Install the matching provider extra.
  2. Keep both the TeenageWorks and provider credentials configured.
  3. Apply the patch once during application startup.
  4. Keep using the existing provider client.
  5. Test every sync, async, streaming, or socket path used by the application.

Tested versions

ProviderVersions
OpenAI3.3.1, 3.3.0, 3.2.0
ElevenLabs2.64.0, 2.63.0, 2.62.0

Unknown versions raise UnsupportedProviderVersionError. Use allow_untested_version=True only for controlled testing; it emits UntestedProviderVersionWarning.

Common failures

SymptomCheck
Call still reaches the providerPatch timing, routed model ID, and installed provider version
Rerouted speech fails authenticationTEENAGEWORKS_API_KEY or TW_API_KEY
Voice sounds differentUse a returned voice_... ID instead of a provider voice name
A parameter has no effectRead TeenageWorksUnsupportedParameterWarning
Format errorRequest PCM, MP3, or WAV
Timestamp errorUse ordinary conversion or streaming
Socket closes during setupCheck key, voice, format, sample rate, and initialization fields

Pin a tested provider version before production. Provider endpoints and non-TTS resources remain unchanged.