Skip to content

[Suggestion] SvelteKit 2 real-time streaming transcription with server hooks (TypeScript) #290

Description

@deepgram-robot

What to build

A working SvelteKit 2 application with real-time streaming transcription using Deepgram's WebSocket API. The app should capture microphone audio in the browser, stream it through a SvelteKit server endpoint (to keep the API key server-side), and display live transcript updates using Svelte 5 reactivity. Include speaker diarization labels and a clean, minimal UI.

Why this matters

SvelteKit is one of the fastest-growing full-stack frameworks with a passionate developer community. Developers building real-time features in SvelteKit need a reference for WebSocket integration patterns, particularly for audio streaming where API key security matters. There's no current SvelteKit example for Deepgram, and the previous Svelte example (circa 2024) predates SvelteKit 2 and Svelte 5's runes-based reactivity model. This fills a visible frontend framework gap.

Suggested scope

  • Language: TypeScript
  • Framework: SvelteKit 2 with Svelte 5 runes ($state, $derived)
  • Deepgram APIs: Streaming STT (Nova-3), speaker diarization
  • Architecture: Browser mic capture → SvelteKit server hook (WebSocket proxy) → Deepgram WebSocket
  • UI: Minimal Svelte components — mic toggle button, live transcript display with speaker labels, interim/final result differentiation
  • Complexity: Intermediate — demonstrates SvelteKit server hooks, WebSocket handling, and Svelte 5 reactivity

Acceptance criteria

  • Runnable with minimal setup (clone, add API key, npm run dev)
  • README explains the pattern clearly
  • Uses SvelteKit 2 and Svelte 5 with runes-based reactivity
  • API key stays server-side (never exposed to browser)
  • Shows interim and final transcript results
  • Includes speaker diarization
  • Uses current Deepgram JS SDK version

Raised by the DX intelligence system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions