deepgram-python-text-to-speech

Implement and review Python code using Deepgram Text-to-Speech v1 APIs.

456|139|Updated May 12, 2021
One-click install
npx skills add https://github.com/deepgram/deepgram-python-sdk --skill deepgram-python-text-to-speech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deepgram-python-text-to-speech
Source: https://github.com/deepgram/deepgram-python-sdk/tree/main/.agents/skills/deepgram-python-text-to-speech
Command: npx skills add https://github.com/deepgram/deepgram-python-sdk --skill deepgram-python-text-to-speech

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps developers implement and review Python code that uses Deepgram Text-to-Speech v1 APIs, covering one-shot REST and streaming WebSocket usage, plus guidance on the in-repo TextBuilder helper for incremental text assembly.

Core Features & Use Cases

  • REST one-shot generation using Speak v1 (client.speak.v1.audio.generate)
  • WebSocket streaming using Speak v1 (client.speak.v1.connect)
  • TextBuilder helper for incremental text assembly
  • Guidance to use the deepgram-python-voice-agent for full-duplex STT + LLM + TTS when needed

Quick Start

Install the Deepgram Python SDK and run a REST or WebSocket TTS workflow using the Speak v1 API.

Frequently Asked Questions about deepgram-python-text-to-speech

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use the Deepgram Python SDK for text-to-speech?

To use Deepgram text-to-speech in Python, install the Deepgram Python SDK and configure your API key to call Speak v1 endpoints for one-shot REST audio generation or WebSocket streaming.

Does Deepgram Speak v1 support WebSocket streaming in Python?

Yes, Deepgram Speak v1 supports WebSocket streaming in Python via the client.speak.v1.connect method, enabling real-time audio synthesis with configurable streaming options.

What is the best way to generate audio incrementally with Deepgram TTS?

The best way to generate audio incrementally is using the TextBuilder helper, which assembles text progressively for streaming WebSocket workflows via the Deepgram Python SDK.

Can I use Deepgram Python TTS for full-duplex voice agent interactions?

For full-duplex voice agent interactions combining STT, LLM, and TTS, use the deepgram-python-voice-agent instead of the standard Speak v1 API for simultaneous bidirectional audio.

Do I need a Deepgram API key to use the Python text-to-speech integration?

Yes, a valid Deepgram API key is required to authenticate requests and configure model, encoding, and streaming options for both REST and WebSocket TTS interactions in Python.

What is the difference between REST one-shot and WebSocket streaming for Deepgram TTS?

REST one-shot generation via client.speak.v1.audio.generate produces complete audio files, while WebSocket streaming via client.speak.v1.connect enables real-time continuous audio synthesis.