Luke Oliff.

Upgraded - The Deepgram JavaScript SDK v3

·Voice AI·8 min read·Luke Oliff

Upgraded - The Deepgram JavaScript SDK v3

Deepgram

Contact UsLog InSign Up FreeArticle·Announcements·

Upgraded - The Deepgram JavaScript SDK v3

Upgraded - The Deepgram Javascript SDK v3. [](https://www.facebook.com/sharer/sharer.php?u=https://www.deepgram.com/learn/upgraded-the-deepgram-javascript-sdk-v3&t=Upgraded - The Deepgram JavaScript SDK v3)[](https://x.com/intent/tweet?url=https://www.deepgram.com/learn/upgraded-the-deepgram-javascript-sdk-v3&text=Upgraded - The Deepgram JavaScript SDK v3)[](https://www.linkedin.com/shareArticle?url=https://www.deepgram.com/learn/upgraded-the-deepgram-javascript-sdk-v3&title=Upgraded - The Deepgram JavaScript SDK v3) Headshot of Luke Oliff

By Luke Oliff

Senior Developer Experience Engineer

Featured Image for Upgraded - The Deepgram JavaScript SDK v3

Headshot of Luke Oliff

By Luke Oliff

Senior Developer Experience Engineer

Updated

Share [](https://www.facebook.com/sharer/sharer.php?u=https://www.deepgram.com/learn/upgraded-the-deepgram-javascript-sdk-v3&t=Upgraded - The Deepgram JavaScript SDK v3)[](https://x.com/intent/tweet?url=https://www.deepgram.com/learn/upgraded-the-deepgram-javascript-sdk-v3&text=Upgraded - The Deepgram JavaScript SDK v3)[](https://www.linkedin.com/shareArticle?url=https://www.deepgram.com/learn/upgraded-the-deepgram-javascript-sdk-v3&title=Upgraded - The Deepgram JavaScript SDK v3)$?/$$?/$ Deepgram Logo Get news and product updates.

By submitting this form, you are agreeing to our Privacy Policy.

Product

Speech-to-Text APIText-to-Speech APIVoice Agent APIAudio Intelligence API

Customers

Customer StoriesPartnersStartup ProgramPowered by Deepgram

Solutions

Contact CentersSpeech AnalyticsConversational AIPodcast TranscriptionMedical TranscriptionStartup Program

Resources

PodcastResource HubAI GlossaryAI Voice Generator ToolIntroducing Deepgram’s Voice Agent APIDeepgram and Amazon Connect Integration

Developers

DocumentationChangelogAPI PlaygroundCommunitySelf-hostedSupport

Company

AboutBlogCareersNewsletterCustomersPartnersNewsroomTermsPrivacyCopyright © 2026 DeepgramListen to article05:10

Table of Contents

  • Quick Tour
  • Prerecorded Transcription
  • Live Transcription
  • Changes
  • ESM and UMD Support
  • WebVTT and SRT Captions
  • Separate Callback and Synchronous Transcription Methods
  • JavaScript Browser and Node.js Friendly (Isomorphic)
  • Improved Live Transcription Events
  • Switch from request to fetch
  • Initialization by Function Instead of Class
  • Scoped Constructor Config
  • Better Errors
  • Support for Future Products
  • Support for On-Prem Deployments
  • Some Example Apps
  • Sign up for Deepgram
  • Learn more about Deepgram Listen to article05:10

Table of Contents

In the ever-evolving landscape of JavaScript development, staying abreast of the latest tools and libraries is crucial. The JavaScript SDK, a fundamental building block for many Deepgram applications, has undergone significant changes to enhance its capabilities and improve developer experience. This blog post takes you on a journey through the noteworthy changes and new features introduced in the latest version.

Quick Tour

Now that we’ve covered the major changes, let’s take a quick tour of the new features introduced in the JavaScript SDK.

Prerecorded Transcription

Example Code

import { deepgram } from "@deepgram/sdk";

const { result, error } = await deepgram.listen.prerecorded.transcribeUrl(
  {
    url: "https://dpgr.am/spacewalk.wav",
  },
  {
    model: "nova",
  }
);

Live Transcription

Example Code

import { deepgram, LiveTranscriptionEvents } from "@deepgram/sdk";

const dgConnection = deepgram.listen.live({ model: "nova" });

dgConnection.on(LiveTranscriptionEvents.Open, () => {
  dgConnection.on(LiveTranscriptionEvents.Transcript, (data) => {
    console.log(data);
  });

  `YOUR_AUDIO_SOURCE`.addListener("got-some-audio", async (event) => {
    dgConnection.send(event.raw_audio_data);
  });
});

Changes

Let’s delve into the key changes that make the new JavaScript SDK stand out among its predecessors.

ESM and UMD Support

ESM (ECMAScript Modules) was one of the most requested features from our community of users.

CommonJS, initially tailored for server-side development and widely adopted, employs synchronous loading, ensuring dependencies are fully loaded before code execution. It seamlessly integrates with Node.js and relies on mechanisms like module.exports or exports for value exportation. While offering dynamic imports, it is not as prevalent as in ESM. On the other hand, ESM, introduced in ECMAScript 6, brings a modern, asynchronous loading approach. With native support for dynamic imports, asynchronous loading, tree shaking, and encapsulation, ESM aligns well with the needs of contemporary web applications.

Considering the dynamic landscape of JavaScript development, the inclusion of both ESM and UMD in our SDK acknowledges the diversity of projects and preferences within the developer community. This strategic addition ensures that our SDK accommodates various module systems, providing flexibility for developers to choose the approach that aligns with their specific project requirements and environments.

WebVTT and SRT Captions

The significance of captions in enhancing content accessibility cannot be overstated. In our latest JavaScript SDK, a deliberate decision has been made to segregate the captions functionality, creating a standalone library. Both WebVTT and SRT captions are now accessible as a versatile standalone package, embodying flexibility and modularity.

This move not only supports Deepgram’s proprietary transcription format but also extends compatibility to captions from other providers (and we welcome contributions to add more).

import { webvtt /* , srt */ } from "@deepgram/captions";

const { results } = /* get results from deepgram */;

const vttOutput = webvtt(result);
// const srtOutput = srt(result);

Read more.

Separate Callback and Synchronous Transcription Methods

Our callback feature has been separated into its own transcription methods. This allows for more robust usage, and less complexity in our type system.

const { results } = deepgram.listen.prerecordedUrl(source, options);

// vs

const { results } = deepgram.listen.prerecordedUrlCallback(source, url, options);

Read more.

JavaScript Browser and Node.js Friendly (Isomorphic)

The SDK ensures a seamless experience across JavaScript and Node.js environments, embracing isomorphic principles. Whether you’re crafting a web application or a server-side script, the SDK has you covered. Transcription in client-side frameworks like React and Vue has been high on the list of wants from our community.

If you’re planning to do REST-based transcription in a client application, we’ve also built the SDK with proxy support included. You can now configure a proxy into your SDK config, to allow you to use the best features while on the client-side. We’ve even included a demo proxy application to get you started.

Improved Live Transcription Events

We have improved the support for different transcription events coming back from our websocket connection.

Switch from request to fetch

In response to the evolving standards of web development, the SDK transitions from the deprecated request library to the modern and widely adopted fetch API, which standards are available natively in many runtimes including most browsers. This reduces the dependencies involved in our SDK.

Initialization by Function Instead of Class

The new SDK adopts a function-based initialization approach, offering simplicity and consistency in how developers set up and configure the transcription service.

Scoped Constructor Config

With scoped constructor config, developers gain better control over the SDK’s behavior, allowing for fine-tuned customization based on specific use cases.

Better Errors

Meaningful error messages are paramount for debugging and troubleshooting. The SDK now provides clearer and more informative error messages, streamlining the development process.

Support for Future Products

Anticipating the future needs of developers, the SDK is designed to seamlessly integrate with upcoming products, ensuring long-term compatibility and extensibility.

Support for On-Prem Deployments

For applications with stringent privacy and security requirements, the SDK introduces support for On-Prem deployments, enabling organizations to maintain control over their transcription infrastructure.

Some Example Apps

Here are our JavaScript SDK ready example apps.

  • Node pre-recorded starter app - A native JavaScript frontend, using a Node server application to interact with Deepgram to transcribe pre-recorded audio.
  • Next.js microphone starter app - A Next.js application, capturing the microphone audio and sending it to Deepgram from the browser.
  • JavaScript microphone demo - A native JavaScript frontend, capturing the microphone audio and sending it to Deepgram from the browser.
  • Node microphone demo - A native JavaScript frontend, capturing the microphone audio in the browser, and sending it to a Node websocket server, which in-turn sends the audio off to Deepgram.
  • Node live example - A small standalone server-side script that captures live audio from a BBC audio feed and sends it to Deepgram.
  • Node pre-recorded example - A small standalone server-side script that sends a pre-recorded file to Deepgram.

Sign up for Deepgram

Sign up for a Deepgram account and get $200 in Free Credit (up to 45,000 minutes), absolutely free. No credit card needed!

Learn more about Deepgram

We encourage you to explore Deepgram by checking out the following resources:

  1. Deepgram API Playground
  2. Deepgram Documentation
  3. Deepgram Starter Apps

You may also like…

Sort by: Article··AI Engineering & Research Don’t Price Voice AI at Today’s Volume: How to Model Cost at Scale Article··AI Engineering & Research The platform tax: what you’re actually paying for a managed voice agent Article··Announcements Deepgram Delivers Real-Time Voice AI at the Edge for Use with Snapdragon Article··AI Engineering & Research Deepgram Vs. Rev AI Vs. Whisper: Latency, Accuracy, and Scalability Tested Article··AI Engineering & Research Conformer Models: ASR Accuracy Benchmarks and Trade-offs Article··AI Engineering & Research Connecting TTS to Twilio: The Complete Guide to Audio Encoding, Streaming, and Production Gotchas Article··AI Engineering & Research When the docs write the code: migrating my Speech-to-Text playground to Python SDK v6 Article··AI Engineering & Research Is ElevenLabs Real-Time? What Developers Need to Know Article··AI Engineering & Research Deepgram Voice Agent API vs OpenAI Realtime API: Building Voice Agents in 2026

## Unlock voice AI at scale with an API Call

Get conversational intelligence with transcription and understanding on the world’s best speech AI platform. Sign Up FreeGet A Demo