Skip to content

feat: Add audio stream transformation hook - #2681

Open
Luca Forstner (lforst) wants to merge 1 commit into
mainfrom
lforst/dum-e/stockholm-e58bb8b84d
Open

Luca Forstner (lforst) wants to merge 1 commit into
mainfrom
lforst/dum-e/stockholm-e58bb8b84d

Conversation

@lforst

Copy link
Copy Markdown
Member
  • Add initLogger({ attachmentStreamHook }) to transform captured LiveKit audio before upload. Previously, recordings were uploaded as raw PCM; hooks can now encode, filter, or omit audio and choose file boundaries.

    initLogger({
      projectName: "voice-agent",
      // New hook; this example passes captured audio through unchanged.
      attachmentStreamHook: async function* (source) {
        yield { format: source.format, chunks: source.chunks };
      },
    });
  • Preserve recording timing and channel assignments across transformed files. If a hook fails, stop capture without uploading the original audio.

  • Make flush() wait for pending recording uploads and closed streams to finish processing, so attachment references reach Braintrust before it returns.

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