TTS (tts/elevenlabs.ts)

Patter · libraries/typescript/src/tts/elevenlabs.ts · typescript · MIT
voice, Voice / Speech

TypeScript class providing ElevenLabs TTS with carrier-specific presets.

// Source: https://github.com/PatterAI/Patter | License: MIT | Copyright 2026 Patter Contributors
// Provided via justclaw.it.com; keep this notice with the code.
/** ElevenLabs TTS for Patter pipeline mode. */
import {
  ElevenLabsTTS as _ElevenLabsTTS,
  type ElevenLabsModel,
  type ElevenLabsOutputFormat,
} from "../providers/elevenlabs-tts";

export type { ElevenLabsModel };

/** Constructor options for the ElevenLabs `TTS` adapter. */
export interface ElevenLabsTTSOptions {
  /** API key. Falls back to ELEVENLABS_API_KEY env var when omitted. */
  readonly apiKey?: string;
  readonly voiceId?: string;
  /**
   * ElevenLabs voice model ID. Default is ``eleven_flash_v2_5`` (lowest TTFT).
   * Pass ``eleven_v3`` for highest quality, or any string for forward-compat.
   */
  readonly mode

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

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

Get a free API key