Skip to content

feat(voice): add managed Python voice eval helpers - #1179

Draft
Alex Z (CLowbrow) wants to merge 1 commit into
mainfrom
codex/voice-eval-helpers
Draft

Alex Z (CLowbrow) wants to merge 1 commit into
mainfrom
codex/voice-eval-helpers

Conversation

@CLowbrow

@CLowbrow Alex Z (CLowbrow) commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Adds braintrust.voice so an eval supplies its agent and caller instead of implementing REST setup, WebSocket audio, playback acknowledgements, interruption epochs, or tracing serialization.

voice_task(...) plugs into Eval / EvalAsync; run_voice_call(...) supports custom tasks. A connector forwards a serializable call context to a local or remote agent and awaits the completed result:

async def connect_agent(call):
    return await agent_service.run_eval_call(call)

async def run_eval_call(call):
    async with voice.connect(call) as session:
        output = await run_agent(transport=session.pipecat_transport())
    return session.result(agent_output=output)

The agent-side helper activates the eval parent before pipeline construction and returns the application result, caller-only transcript, and recording references after finalization. Native Pipecat and LiveKit transports handle media and shutdown; the LiveKit receiver also reports agent failures back to the eval. Inline callers and saved references are supported. Call credentials are excluded from SDK logs and malformed-result errors.

Backend dependency

Requires the companion session API and data plane feature version 149. Deploy that backend capability before releasing these helpers. Existing disabled voice services remain disabled.

Validation

  • 21 new SDK tests passed using local HTTP/WebSocket servers, real Pipecat pipelines, and a local LiveKit server (v1.11.0).
  • Tested Pipecat 1.17.0 / LiveKit Agents 1.8.12, plus the supported older versions 1.3.0 / 1.8.9.
  • Covered local and remote evals, parent isolation, consumed-audio acknowledgements, interruptions, recording failures, disconnects, cancellation, capacity retries, and credential redaction.
  • Production-module Pyright: zero errors. Scoped pinned pre-commit checks passed.
  • Full-repository make fixup found pre-existing import-order issues in six maintenance scripts; incidental edits to those files were excluded.

Usage examples are included in py/src/braintrust/voice/README.md.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant