Skip to content

[Suggestion] tRPC real-time streaming transcription with WebSocket subscriptions (TypeScript) #316

Description

@deepgram-robot

What to build

A full-stack TypeScript application using tRPC with WebSocket subscriptions to stream real-time Deepgram transcription results from server to client with end-to-end type safety.

Why this matters

tRPC is the standard type-safe API layer for TypeScript full-stack applications, powering the T3 stack and widely adopted with Next.js, Nuxt, and standalone setups. Developers using tRPC expect their audio transcription pipeline to be fully typed from server-side Deepgram SDK calls through to client-side transcript rendering. tRPC's WebSocket subscription model is a natural fit for streaming transcription, but no reference implementation exists showing how to bridge Deepgram's streaming WebSocket with tRPC's subscription pattern.

Suggested scope

  • Framework: tRPC v11 with WebSocket adapter
  • Language: TypeScript (end-to-end type safety)
  • Server: Node.js with @trpc/server and ws adapter
  • Client: React with @trpc/react-query
  • Deepgram APIs: Streaming STT (Nova-3 or Flux)
  • Architecture: tRPC router with transcription.stream subscription procedure; server connects to Deepgram WebSocket and relays typed results through tRPC subscription; client consumes via trpc.transcription.stream.useSubscription()
  • Complexity: Medium — demonstrates the tRPC WebSocket subscription + Deepgram streaming bridge pattern

Acceptance criteria

  • Runnable with minimal setup (clone, add API key, run)
  • README explains the pattern clearly
  • Uses current SDK version
  • Full end-to-end TypeScript type safety (Deepgram response types flow through tRPC to client)
  • Demonstrates interim and final transcript results via tRPC subscription
  • Includes microphone capture on the client side

Raised by the DX intelligence system.

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