Skip to content

[Suggestion] Anthropic Claude tool use with Deepgram STT and TTS as callable tools (Python) #252

@deepgram-robot

Description

@deepgram-robot

What to build

A Python example showing how to register Deepgram STT and TTS as tools in Anthropic Claude's tool use (function calling) system, enabling Claude to transcribe audio files and generate speech on demand as part of a conversational AI workflow.

Why this matters

AI agents that can hear and speak are a rapidly growing use case. Developers building with Claude's tool use API need a reference showing how to wire Deepgram's capabilities as callable tools — so Claude can decide when to transcribe audio or generate speech based on conversation context. This pattern is essential for building multimodal AI assistants, voice-enabled chatbots, and audio processing pipelines orchestrated by an LLM.

Suggested scope

  • Language: Python
  • Framework: Anthropic Python SDK (anthropic >= 0.40)
  • Deepgram APIs: Pre-recorded STT (Nova-3), TTS (Aura), Audio Intelligence (summarization, sentiment)
  • Tools defined:
    • transcribe_audio(url) → returns transcript + summary
    • speak_text(text, voice) → generates and plays audio
    • analyze_sentiment(url) → returns sentiment analysis
  • Complexity: Medium — requires Anthropic tool use schema, Deepgram API calls, and tool result handling

Acceptance criteria

  • Runnable with minimal setup (clone, add API keys, run)
  • README explains the pattern clearly
  • Uses current SDK versions for both Anthropic and Deepgram
  • Demonstrates at least 3 Deepgram tools registered with Claude
  • Shows the full tool use loop: user request → Claude decides to use tool → tool executes → Claude summarizes result
  • Handles audio file URLs and local files

Raised by the DX intelligence system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions