PiperTTSService (piper/tts.py)

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

Copyright (c) 2024–2025, Daily SPDX-License-Identifier: BSD 2-Clause License

# 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
#

"""Piper TTS service implementation."""

from typing import AsyncGenerator, Optional

import aiohttp
from loguru import logger

from pipecat.frames.frames import (
    ErrorFrame,
    Frame,
    TTSStartedFrame,
    TTSStoppedFrame,
)
from pipecat.services.tts_service import TTSService
from pipecat.utils.tracing.service_decorators import traced_tts


# This assumes a running TTS service running: https://github.com/OHF-Voice/piper1-gpl/blob/main/docs/API_HTTP.md
class PiperTTSService(TTSService):
    """Piper TTS service implementat

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

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

Get a free API key