Skip to content

feat(voice): add a Pipecat transport over the WebSocket core - #1185

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

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

Conversation

@CLowbrow

Copy link
Copy Markdown
Contributor

Adds a native Pipecat transport on top of the generic WebSocket voice eval core. This PR targets codex/voice-eval-helpers so its diff contains only Pipecat integration, tests, and usage guidance.

from braintrust import voice
from braintrust.voice.pipecat import PipecatTransport

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

The existing agent runner accepts a normal Pipecat transport and places input() / output() in its pipeline. The adapter connects the core's audio callbacks, discards interrupted playback, signals EndFrame on completion, and propagates ErrorFrame failures. It uses the public core API without reaching into session internals. Existing Braintrust Pipecat instrumentation inherits the parent activated by voice.connect.

Reuses the WebSocket core for conversion, pacing, acknowledgements, finalization, recordings, and tracing. Application code supplies the runner and its actual output.

Validation:

  • Two native pipeline cases passed on Pipecat 1.17.0 and 1.3.0, covering audio, interruptions, completion, and agent errors.
  • Combined core and Pipecat suite: 16 tests passed.
  • Adapter Pyright: zero errors. Scoped pinned pre-commit checks passed.

Depends on #1179; retarget to main after that PR merges.

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