Metadata-Version: 2.4
Name: strands-deepgram
Version: 0.1.0
Summary: Deepgram speech processing tool for Strands Agents SDK
Home-page: https://github.com/eraykeskinmac/strands-deepgram
Author: Eray Keskin
Author-email: Eray Keskin <eraykeskinmac@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/eraykeskinmac/strands-deepgram
Project-URL: Documentation, https://github.com/eraykeskinmac/strands-deepgram
Project-URL: Repository, https://github.com/eraykeskinmac/strands-deepgram
Project-URL: Bug Reports, https://github.com/eraykeskinmac/strands-deepgram/issues
Keywords: strands,ai,agents,deepgram,speech-to-text,text-to-speech,audio-intelligence
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: strands-agents>=1.11.0
Requires-Dist: deepgram-sdk>=3.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# strands-deepgram

[![PyPI version](https://img.shields.io/pypi/v/strands-deepgram.svg)](https://pypi.org/project/strands-deepgram/)
[![Python Support](https://img.shields.io/pypi/pyversions/strands-deepgram.svg)](https://pypi.org/project/strands-deepgram/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Deepgram speech processing tool for [Strands Agents SDK](https://github.com/strands-agents/strands). 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

```bash
pip install strands-deepgram
```

## Quick Start

```python
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:

```bash
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](https://console.deepgram.com/)

## Supported Actions

### Speech-to-Text (`transcribe`)

```python
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`)

```python
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`)

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

**Features:**

- Sentiment analysis
- Topic detection
- Intent recognition
- Language detection

## Testing

```bash
# 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](LICENSE) file for details.

## Links

- **PyPI**: [pypi.org/project/strands-deepgram](https://pypi.org/project/strands-deepgram/)
- **GitHub**: [github.com/eraykeskinmac/strands-deepgram](https://github.com/eraykeskinmac/strands-deepgram)
- **Strands Agents SDK**: [github.com/strands-agents/strands](https://github.com/strands-agents/strands)
- **Deepgram API**: [developers.deepgram.com](https://developers.deepgram.com/)

---

**Built for the Strands community** 🚀
