Skip to content

[bot] Instrument ElevenLabs Python SDK (2,446,296 weekly downloads) #615

Description

@braintrust-bot

Summary

elevenlabs is the official Python SDK for the ElevenLabs API (https://github.com/elevenlabs/elevenlabs-python), a widely used generative audio provider (text-to-speech, speech-to-text, and conversational voice agents). Its ElevenLabs/AsyncElevenLabs clients expose text_to_speech.convert() and a streaming variant text_to_speech.stream() as the primary generation execution entrypoints, e.g.:

audio = elevenlabs.text_to_speech.convert(
    text="The first move is what sets everything in motion.",
    voice_id="JBFqnCBsd6RMkjVDRZzb",
    model_id="eleven_v3",
    output_format="mp3_44100_128",
)

This is a real generation execution surface (text → generated audio, with a model_id and streaming support) analogous in shape to the completion/generation surfaces this repo already instruments for OpenAI, Anthropic, and Google GenAI — but for a different modality (audio) and a provider not covered at all today.

This repository has zero instrumentation for it — no py/src/braintrust/integrations/elevenlabs* directory, no wrapper, no nox session, no cassette directory, and no entry in py/pyproject.toml's [tool.braintrust.matrix].

Weekly downloads

Weekly downloads: 2,446,296 (as of 2026-07-23; https://pypistats.org/packages/elevenlabs). Cross-checked against https://pepy.tech/projects/elevenlabs, which shows 9.6M downloads over the trailing 30 days (~2.2M/week), consistent with the pypistats figure. Note: this is distinct from the much smaller unofficial elevenlabslib package.

Braintrust docs status

not_found. Checked https://www.braintrust.dev/docs/guides/tracing and https://www.braintrust.dev/docs/guides/tracing/integrations — ElevenLabs is not mentioned in either the provider list or the tracing-integrations directory (OpenTelemetry, Temporal, Vercel AI SDK, OpenRouter SDK, LangChain, LangSmith, LlamaIndex, Agno, Apollo GraphQL, Cloudflare Workers AI, DSPy, Instructor, LiteLLM, Ruby LLM, Traceloop, TrueFoundry).

What needs to be instrumented

  • client.text_to_speech.convert() (sync) and the AsyncElevenLabs equivalent — primary TTS generation call, should log input text/voice/model and output audio metadata.
  • client.text_to_speech.stream() — streaming generation variant.
  • Speech-to-text conversion surface, if present on the current stable client (worth confirming exact method name against the current SDK version during implementation).

Upstream sources

Local repo files inspected

  • py/src/braintrust/integrations/ — no elevenlabs directory
  • py/src/braintrust/wrappers/ — no ElevenLabs wrapper
  • py/pyproject.toml [tool.braintrust.matrix] — no elevenlabs entry
  • py/noxfile.py — no test_elevenlabs session
  • Repo-wide case-insensitive grep for elevenlabs under py/ — zero matches

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions