deepgram/deepgram-python-sdk

Official Python SDK for Deepgram.

What it solves

This SDK provides a unified Python interface to access Deepgram's AI models for speech-to-text, text-to-speech, and language understanding. It simplifies the process of integrating real-time audio streaming, file-based transcription, and conversational AI agents into Python applications.

How it works

The SDK offers both synchronous and asynchronous clients (DeepgramClient and AsyncDeepgramClient) to interact with Deepgram's APIs. It supports multiple modalities:

  • Speech-to-Text (Listen): Transcribes audio files or real-time streams via WebSockets.
  • Text-to-Speech (Speak): Generates natural-sounding audio from text input.
  • Text Intelligence (Read): Analyzes text for sentiment, topics, and intents.
  • Conversational AI (Agent): Orchestrates a full loop of listening, thinking (via LLMs like GPT-4o-mini), and speaking to create interactive voice agents.

Who it’s for

Developers building voice-enabled applications, real-time transcription services, or AI voice agents who need a robust, type-safe Python wrapper for Deepgram's AI services.

Highlights

  • Real-time Streaming: Supports WebSocket connections for low-latency speech recognition and voice agents.
  • Agentic Framework: Built-in support for creating conversational AI agents that combine transcription, LLM reasoning, and synthesis.
  • Flexible Authentication: Supports both API keys and temporary access tokens.
  • Custom Transports: Allows developers to replace the default WebSocket transport with custom implementations, including a specialized transport for AWS SageMaker endpoints.

Related

  • Project
  • Project
  • Project
  • Project
  • Project