Skip to content

[Suggestion] FastHTML real-time streaming transcription with WebSocket (Python) #266

@deepgram-robot

Description

@deepgram-robot

What to build

A real-time audio transcription web app built with FastHTML that streams microphone audio to Deepgram's STT API via WebSocket and displays live transcription results — all in pure Python with no JavaScript framework.

Why this matters

FastHTML is a rapidly growing Python web framework that lets developers build interactive web apps entirely in Python using HTMX for reactivity. It has a large and enthusiastic community of Python developers who prefer to avoid JavaScript toolchains. A Deepgram + FastHTML example gives these developers a native way to build voice-powered apps in their preferred stack, and demonstrates that real-time streaming transcription is achievable without a JavaScript frontend framework.

Suggested scope

  • Language: Python
  • Framework: FastHTML + HTMX
  • Deepgram APIs: STT (Nova-3 streaming WebSocket)
  • Features:
    • Browser microphone capture via minimal inline JavaScript (getUserMedia)
    • WebSocket bridge: browser → FastHTML server → Deepgram streaming API
    • Live transcript display updated via HTMX WebSocket extension
    • Interim and final result handling with visual distinction
    • Smart formatting and punctuation enabled
  • Includes: Single Python file app, minimal dependencies, no build step
  • Complexity: Beginner-Intermediate

Acceptance criteria

  • Runnable with minimal setup (pip install -r requirements.txt, add API key, python main.py)
  • README explains the FastHTML + Deepgram WebSocket pattern
  • Uses current SDK version
  • Single-file or minimal-file implementation (FastHTML's strength is simplicity)
  • Live transcription updates appear in the browser without page refresh
  • Distinguishes between interim and final transcription results visually
  • No Node.js, npm, or JavaScript build tools required

Raised by the DX intelligence system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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