Skip to content

[Enhancement] Add CDN-compatible browser bundle with built-in microphone capture #478

@deepgram-robot

Description

@deepgram-robot

Summary

Publish a CDN-compatible browser bundle (deepgram.browser.min.js) that can be loaded via a <script> tag without any bundler, and includes a built-in microphone capture helper for zero-setup browser transcription.

Problem it solves

Frontend developers who want to add live transcription to a webpage currently need to: (1) set up a Node.js project with a bundler, (2) install the SDK via npm, (3) write their own `getUserMedia()` microphone capture code, and (4) manually pipe audio buffers to the WebSocket. This creates a high barrier for prototyping, demos, and simple integrations. A CDN bundle with mic capture would reduce "hello world" browser transcription to 3 lines of HTML — matching the simplicity competitors offer with dedicated browser packages.

Proposed API

<!-- Zero-bundler usage -->
<script src="https://cdn.jsdelivr.net/npm/@deepgram/sdk/dist/deepgram.browser.min.js"></script>
<script>
  const dg = new Deepgram.Client({ key: tempApiKey });

  // Built-in mic capture → streaming transcription
  const mic = await dg.listen.live.microphone({
    model: "nova-3",
    language: "en",
  });

  mic.on("transcript", (result) => {
    console.log(result.channel.alternatives[0].transcript);
  });

  mic.start(); // starts getUserMedia + WebSocket
  // mic.stop(); // stops both
</script>

Acceptance criteria

  • Published as part of @deepgram/sdk with browser-specific entry point
  • Loadable via CDN (jsDelivr, unpkg) with <script> tag
  • Built-in getUserMedia() microphone capture helper
  • Works without bundler, transpiler, or Node.js
  • Documented with zero-bundler quickstart example
  • Compatible with existing SDK API (same event names, same options)

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