deepgram-js-sdk  by deepgram

JavaScript SDK for advanced speech and language AI

Created 5 years ago
256 stars

Top 98.5% on SourcePulse

GitHubView on GitHub
Project Summary

This JavaScript/TypeScript SDK provides a streamlined interface for developers to integrate Deepgram's advanced speech and language AI models into their applications. It offers clients for real-time speech recognition, text-to-speech, language understanding, and conversational AI, enabling easy access to world-class speech processing capabilities.

How It Works

The SDK abstracts Deepgram's various APIs into a unified, type-safe client. It leverages WebSockets for low-latency, real-time audio streaming transcription and conversational AI, and provides methods for batch processing audio files via REST. The design prioritizes developer experience with clear examples and robust error handling, abstracting away the complexities of direct API interactions.

Quick Start & Requirements

  • Install: npm install @deepgram/sdk
  • Prerequisites: Node.js 18+, Vercel, Cloudflare Workers, Deno v1.25+, Bun 1.0+, React Native. An API key from Deepgram is required for authentication.
  • Documentation: Comprehensive API documentation and guides are available at developers.deepgram.com.

Highlighted Details

  • Supports real-time transcription (WebSocket), file transcription, text-to-speech generation, text analysis (sentiment, topics, intents), and conversational AI (Voice Agent).
  • Offers flexible authentication via API Keys (server-side) or Access Tokens (client-side recommended), with support for environment variables.
  • Provides direct WebSocket connectivity for browser-based real-time features; REST API calls from browsers necessitate a proxy server due to CORS restrictions.
  • Exports all request and response types as TypeScript interfaces for enhanced type safety and developer tooling.

Maintenance & Community

The library is primarily generated from Deepgram's API specifications, with contributions welcomed. Help and community engagement are available via GitHub issues, Discord, and GitHub Discussions. Older SDK versions receive limited support.

Licensing & Compatibility

Licensed under the permissive MIT License, allowing for broad compatibility with commercial and closed-source applications. Compatible with modern JavaScript runtimes including Node.js, Vercel, Cloudflare Workers, Deno, and Bun.

Limitations & Caveats

REST API operations initiated from web browsers require a proxy server to handle CORS headers, adding an extra layer to client-side deployments. Browser-based REST calls require configuring a baseUrl pointing to a custom proxy and using "proxy" as the API key.

Health Check
Last Commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
6
Issues (30d)
8
Star History
9 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.