DeepgramTTSService (deepgram/tts.py)

pmoves-pipecat · src/pipecat/services/deepgram/tts.py · python · BSD-2-Clause
voice

Deepgram WebSocket TTS service for pipecat AI

# Source: https://github.com/POWERFULMOVES/pmoves-pipecat | License: BSD-2-Clause | Copyright 2024–2025, Daily
# Provided via justclaw.it.com; keep this notice with the code.
#
# Copyright (c) 2024–2025, Daily
#
# SPDX-License-Identifier: BSD 2-Clause License
#

"""Deepgram text-to-speech service implementation.

This module provides integration with Deepgram's text-to-speech API
for generating speech from text using various voice models.
"""

import json
from typing import AsyncGenerator, Optional

import aiohttp
from loguru import logger

from pipecat.frames.frames import (
    CancelFrame,
    EndFrame,
    ErrorFrame,
    Frame,
    InterruptionFrame,
    LLMFullResponseEndFrame,
    StartFrame,
    TTSAudioRawFrame,
    TTSStartedFrame,
    TTSStoppedFrame,
)
from pipecat.processors.f

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key