docs(pipecat): document instrument_user_aggregator for realtime user transcript#4948
Merged
Caroline di Vittorio (carolinedivittorio) merged 2 commits intoJul 17, 2026
Conversation
…transcript Add a section on capturing the realtime (speech-to-speech) user transcript via span_processor.instrument_user_aggregator, and note it must not be used with the cascade (where it would double-count the user's turns). Mirrors the instrument_session guidance added for the LiveKit integration. Also call out that OpenAI Realtime needs input-audio transcription (InputAudioTranscription) enabled on the session or the aggregator never fires, and pin the new API to langsmith[pipecat]>=0.10.6 (where it was introduced).
Contributor
|
Thanks for opening a docs PR, Caroline di Vittorio (@carolinedivittorio)! When it's ready for review, please add the relevant reviewers:
|
Contributor
|
Mintlify preview branch generated: Site preview: https://langchain-5e9cc07a-preview-pipeca-1784309653-931857a.mintlify.site Important Preview links may take a few minutes to start working while the deployment finishes. Changed documentation pages (preview deep links): |
Caroline di Vittorio (carolinedivittorio)
requested a review
from Kathryn May (katmayb)
July 17, 2026 17:44
Kathryn May (katmayb)
approved these changes
Jul 17, 2026
Caroline di Vittorio (carolinedivittorio)
merged commit Jul 17, 2026
a83ae72
into
main
24 checks passed
Caroline di Vittorio (carolinedivittorio)
deleted the
pipecat-realtime-instrument-user-transcript-docs
branch
July 17, 2026 18:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A speech-to-speech (realtime) Pipecat model (for example,
OpenAIRealtimeLLMService) has no separate speech-to-text stage, so the user's transcript is never emitted as an OTel span — it arrives through the user context aggregator'son_user_turn_message_addedcallback. Without wiring it up, the trace shows only the assistant side.This mirrors what the LiveKit integration docs did for
instrument_session, but for the Pipecat integration'sinstrument_user_aggregator.Changes
src/langsmith/trace-with-pipecat.mdx, placed after "Group a conversation into a thread" (matching the LiveKit doc's structure):span_processor.instrument_user_aggregator(context_aggregator, conversation_id)right after building the aggregator, correlating by the id set withset_thread_id.InputAudioTranscription) on the session, or the aggregator never fires (the model receives raw audio and produces no user-side text). Other realtime services that surface user text through the aggregator themselves (e.g. Gemini Live) need only theinstrument_user_aggregatorcall.langsmith[pipecat]>=0.10.6(the release that introducedinstrument_user_aggregator).Verification
instrument_user_aggregatorwas confirmed to ship in publishedlangsmith==0.10.6(absent in 0.10.4 / 0.10.5), so the>=0.10.6pin is accurate.AudioInput/InputAudioTranscription) andLLMContextAggregatorPair(..., realtime_service_mode=True)in the example match the instrumented demo in feat(pipecat): capture realtime user transcript in openai + gemini demos voice-demo#15.#when-using-pipecat-with-a-realtime-modelmatches the generated heading slug.