Skip to content

[bot] Instrument aws-sdk-transcribestreaming (4,014 weekly downloads) #94

Description

@braintrust-bot

Summary

The Braintrust Rust SDK has no instrumentation for aws-sdk-transcribestreaming, AWS's official Rust SDK crate for the Amazon Transcribe Streaming service — real-time speech-to-text execution. Braintrust already treats audio transcription as an in-scope, traced generative-AI capability (its OpenAI integration docs list "Transcription" as a covered Audio API, and issue #84 in this repo already flags the equivalent gap for local whisper-rs execution), but no Braintrust SDK instruments AWS's hosted real-time transcription service.

What is missing

aws_sdk_transcribestreaming::client::Client exposes these execution-oriented operations (per https://docs.rs/aws-sdk-transcribestreaming/latest/aws_sdk_transcribestreaming/client/struct.Client.html):

  • start_stream_transcription — the core execution call: opens a bidirectional stream, accepting an input audio-chunk event stream and returning a live transcript-result event stream, with configurable language identification, vocabulary filters, speaker partitioning, and PII redaction.
  • start_call_analytics_stream_transcription — real-time Call Analytics transcription (adds sentiment/categorization signals to the live transcript stream).
  • start_medical_stream_transcription — specialty medical real-time transcription.
  • start_medical_scribe_stream / get_medical_scribe_stream — Amazon Web Services HealthScribe session execution and status retrieval.

None of this is wired into the SDK:

  1. No usage extraction pathextract_openai_usage()/extract_anthropic_usage() in src/extractors.rs parse a JSON usage object with token counts. Transcribe Streaming has no token-usage concept at all (billing is by audio duration, not tokens) and returns typed Rust event-stream structs (TranscriptEvent, Result, Alternative), not a serde_json::Value — neither extractor applies.
  2. No stream aggregation pathBraintrustStream::aggregate() (src/stream.rs) deserializes items as StreamChunk { model, choices, usage } (OpenAI Chat Completions shape) from a Stream<Item = Result<Value, E>>. Transcribe Streaming's bidirectional event stream (interim + final Results with per-word timing/confidence) has no choices/JSON structure and is structurally incompatible with the existing aggregator, mirroring the same class of gap already noted for whisper-rs ([bot] Instrument whisper-rs (58,308 weekly downloads) #84) and Gemini's streamGenerateContent ([bot] BraintrustStream cannot aggregate Google Gemini streamGenerateContent events #60), but for AWS's distinct, typed, bidirectional-streaming client.
  3. No transcription span type — there is no equivalent of a "transcription span" (input audio stream reference, output transcript segments with timestamps/confidence, detected language) anywhere in src/types.rs.

Library significance

Weekly downloads

Weekly downloads: 4,014 (as of 2026-08-12; https://crates.io/api/v1/crates/aws-sdk-transcribestreaming/downloads)

Methodology: exact sum of the crates.io downloads API's daily version_downloads entries (summed across all versions publishing downloads on a given day) plus meta.extra_downloads entries, for the complete 7-day window 2026-08-06 through 2026-08-12 inclusive (checked on 2026-08-17; more recent days were excluded due to crates.io's daily-aggregation lag). Per-day combined totals: 08-06: 630; 08-07: 527; 08-08: 481; 08-09: 394; 08-10: 679; 08-11: 492; 08-12: 811. Sum = 4,014. 90-day recent_downloads reported directly by crates.io: 51,181 (consistent with this weekly figure, ≈3.9K/week average).

Braintrust docs status

supported for the underlying capability class (audio transcription), but not_found for Amazon Transcribe/AWS specifically. Checked https://www.braintrust.dev/docs/integrations/ai-providers/openai directly on 2026-08-17: the Python span-coverage table lists "Audio APIs (audio captured as an attachment)" as covering "Transcription, Translation, Speech," confirming transcription is already an in-scope traced capability class for Braintrust (for OpenAI's client). Neither Amazon Transcribe nor any AWS transcription service is mentioned on https://www.braintrust.dev/docs/integrations/ai-providers or https://www.braintrust.dev/docs/integrations/ai-providers/bedrock.

Relationship to existing issues

Upstream sources

Braintrust docs sources

Local repo files inspected

  • src/extractors.rsextract_openai_usage() and extract_anthropic_usage() both operate on token-usage JSON; Transcribe Streaming has no token-usage concept and returns typed event-stream structs, not JSON
  • src/stream.rsBraintrustStream::aggregate()/wrap_stream_with_span() require a Stream<Item = Result<Value, E>> deserializing OpenAI-shaped chunks; incompatible with Transcribe Streaming's bidirectional typed event stream
  • src/types.rs — no transcription-oriented span fields (segments, timestamps, confidence, detected language)
  • src/lib.rs — public API exports; no Amazon Transcribe references
  • Cargo.toml — no aws-sdk-transcribestreaming dependency
  • Full local codebase search for transcribestreaming, start_stream_transcription, TranscriptEvent — zero results

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions