Transcript (providers/base.py)

Patter · libraries/python/getpatter/providers/base.py · python · MIT
voice, Voice / Speech

Base classes for speech providers, including STT, TTS, and VAD abstractions.

# Source: https://github.com/PatterAI/Patter | License: MIT | Copyright 2026 Patter Contributors
# Provided via justclaw.it.com; keep this notice with the code.
"""Base classes for all Patter providers."""

from __future__ import annotations

from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import Any, AsyncIterator, Literal


# === STT ===


@dataclass(frozen=True)
class Transcript:
    """A transcription result emitted by an :class:`STTProvider`.

    ``is_final`` distinguishes provisional partials from finalised utterances;
    additional fields carry provider-specific hints (``speech_final``,
    ``event_type``) and metadata used for cost reconciliation.

    This dataclass is frozen (immutable). ``words`` uses a tuple so the
    container is hashable; 

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

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

Get a free API key