Skip to main content

Deepgram speech processing tool for Strands Agents SDK

Project description

strands-deepgram

PyPI version Python Support License: MIT

Deepgram speech processing tool for Strands Agents SDK. Enables powerful speech-to-text, text-to-speech, and audio intelligence capabilities for AI agents.

Features

  • Speech-to-Text: Transcribe audio with 30+ language support
  • Text-to-Speech: Generate natural-sounding speech in multiple voices
  • Audio Intelligence: Sentiment analysis, topic detection, intent recognition
  • Speaker Diarization: Identify and separate different speakers
  • Multi-format Support: WAV, MP3, M4A, FLAC, and more
  • Type Safe: Full type hints and validation
  • Easy Integration: Drop-in tool for Strands agents

Requirements

  • Python 3.9+
  • Strands Agents SDK 1.11.0+
  • Deepgram SDK 3.0+

Installation

pip install strands-deepgram

Quick Start

from strands import Agent
from strands_deepgram import deepgram

# Create an agent with Deepgram tool
agent = Agent(tools=[deepgram])

# Transcribe audio with speaker identification
agent("transcribe audio from recording.mp3 in Turkish with speaker diarization")

# Text-to-speech
agent("convert this text to speech and save as output.mp3: Hello world")

# Audio intelligence
agent("analyze sentiment and topics in recording.wav")

Configuration

Set your Deepgram API key as an environment variable:

DEEPGRAM_API_KEY=your_deepgram_api_key  # Required
DEEPGRAM_DEFAULT_MODEL=nova-3            # Optional
DEEPGRAM_DEFAULT_LANGUAGE=en             # Optional

Get your API key at: console.deepgram.com

Supported Actions

Speech-to-Text (transcribe)

agent("transcribe this audio file: path/to/audio.mp3")

Features:

  • Multi-language transcription (30+ languages)
  • Speaker diarization (identify different speakers)
  • Smart formatting and punctuation
  • Word-level timestamps
  • Sentiment analysis (optional)
  • Topic and intent detection (optional)

Text-to-Speech (text_to_speech)

agent("convert this text to speech: Hello, how are you today?")

Features:

  • Natural-sounding voices (Aura series)
  • Multiple audio formats (MP3, WAV, FLAC)
  • Customizable speech parameters
  • Voice selection

Audio Intelligence (analyze)

agent("analyze sentiment and topics in audio: call.mp3")

Features:

  • Sentiment analysis
  • Topic detection
  • Intent recognition
  • Language detection

Testing

# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Links


Built for the Strands community 🚀

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strands_deepgram-0.1.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

strands_deepgram-0.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file strands_deepgram-0.1.0.tar.gz.

File metadata

  • Download URL: strands_deepgram-0.1.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for strands_deepgram-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0c93e234db350bbc384a3f5a09e362ff3e1e4f598583fd41b99e0a57edf02b76
MD5 89d27dd87e960532642025c2414aad50
BLAKE2b-256 7974058e75dd17c00bbf0e26d1279f41ea8d28e049d730feac98b07c1cda0be8

See more details on using hashes here.

Provenance

The following attestation bundles were made for strands_deepgram-0.1.0.tar.gz:

Publisher: publish.yml on eraykeskinmac/strands-deepgram

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file strands_deepgram-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for strands_deepgram-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 967c1879cfddbc0914dfe2ae1658e812a1899007571b5d0cdd2137e9f64e939e
MD5 ab4eb2f673fd3be75a0dd9b63d0d663f
BLAKE2b-256 79e3f0f342e76119e5cee1e4847d20b1d4ebe5940d19f57bdf4166f675783423

See more details on using hashes here.

Provenance

The following attestation bundles were made for strands_deepgram-0.1.0-py3-none-any.whl:

Publisher: publish.yml on eraykeskinmac/strands-deepgram

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page