Skip to content

feat: span UI audio playback for STT/TTS spans (LAT-720) - #3804

Closed
geclos wants to merge 4 commits into
developmentfrom
cursor/investigate-stt-tts-audio-b9cc
Closed

feat: span UI audio playback for STT/TTS spans (LAT-720)#3804
geclos wants to merge 4 commits into
developmentfrom
cursor/investigate-stt-tts-audio-b9cc

Conversation

@geclos

@geclos geclos commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds voice span support end-to-end: OTLP ingestion maps STT/TTS audio attributes to GenAI message parts, ClickHouse stores/retrieves them, and the span detail UI renders playable audio controls on the Spans tab (not the Conversation tab).

QA performed

Automated QA added and run locally:

Layer Test Result
Parser voice.test.ts (6 tests)
OTLP transform voice-transform.test.ts — STT input audio URI + output text, TTS input text + output audio URI
ClickHouse span-repository.test.tsfindBySpanId roundtrip for voice messages with audio JSON ✅ (376 tests)
Web UI voice-span-section.test.tsxisVoiceSpan, audio <audio> src, lazy transcript text, no-audio text-only
Typecheck @domain/spans, @app/web
Biome @domain/spans check

Not QA'd in this environment: full browser E2E (Docker unavailable in cloud VM). Manual verification steps for local dev:

  1. Ingest a trace with gen_ai.input.audio.uri / gen_ai.output.audio.uri attrs
  2. Open trace → Spans tab → select STT/TTS span
  3. Confirm mic/speaker icons, <audio controls> players, Input/Output sections
  4. Confirm Conversation tab does not show voice spans (LLM-only rollup)

Changes

  • parseVoice parser — maps flat voice attrs (gen_ai.*, LiveKit, voice.*) to GenAI messages with audio parts
  • VoiceSpanSection — span detail UI for transcribe/speech operations and spans with audio message parts
  • span-icon.tsx — MicIcon (transcribe), Volume2Icon (speech)
  • specs/voice-audio-spans.md — instrumentation guide for customers emitting audio URIs/blobs

Notes

  • Frameworks mostly emit text transcripts, not audio. Playable audio requires customer instrumentation with documented attrs.
  • Conversation tab remains LLM-only by design.

Linear Issue: LAT-720

Open in Web Open in Cursor 

…LAT-720)

Document current capabilities and gaps across UI rendering, OTLP parsers,
rollup gates, and framework telemetry. Playable audio is feasible when
customers attach uri/blob audio parts, but frameworks today emit text only.

Co-authored-by: Gerard <gerard@latitude.so>
Shift product direction from conversation tab to span detail: add
VoiceSpanSection with native audio controls, parseVoice OTLP parser for
flat text/audio attrs, and transcribe/speech span icons.

Co-authored-by: Gerard <gerard@latitude.so>
@cursor cursor Bot changed the title docs: investigate STT/TTS span ingestion and playable session audio (LAT-720) feat: span UI audio playback for STT/TTS spans (LAT-720) Jul 2, 2026
cursoragent and others added 2 commits July 2, 2026 05:03
Co-authored-by: Gerard <gerard@latitude.so>
Add OTLP transform integration test for STT/TTS audio attrs, ClickHouse
roundtrip test for voice message JSON, and VoiceSpanSection component tests
that verify audio controls and transcript rendering.

Co-authored-by: Gerard <gerard@latitude.so>
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-system Error Error Jul 6, 2026 1:13pm

Request Review

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

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants