import { TTS } from '../../agents/providers.js'; import type { GoogleTTSModel } from './models.js'; /** Options for selecting a Google Cloud TTS voice. */ export type GoogleVoiceConfigOptions = { /** BCP-47 language code for the voice (e.g. `'en-US'`). Default `'en-US'`. */ languageCode?: string | null; /** Google voice name (e.g. `'en-US-Neural2-F'`). Default `''` (empty). */ name?: string; }; declare class GoogleVoiceConfigImpl { static readonly displayName = "GoogleVoiceConfig"; languageCode: string | null; name: string; language_code: string | null; constructor(opts?: GoogleVoiceConfigOptions); } /** A resolved Google Cloud TTS voice selection. */ export type GoogleVoiceConfig = GoogleVoiceConfigImpl; /** Build a Google Cloud TTS voice selection (language code + voice name). */ export declare const GoogleVoiceConfig: (opts?: GoogleVoiceConfigOptions) => GoogleVoiceConfig; /** Configuration options for the Google Cloud text-to-speech (TTS) provider. */ export type GoogleTTSOptions = { /** Google API key. Falls back to the `GOOGLE_API_KEY` environment variable, then `null`. */ apiKey?: string | null; /** Service-account credentials as a JSON string. Default `null`. */ credentialsJson?: string | null; /** Path to a service-account JSON key file. Default `null`. */ serviceAccountPath?: string | null; /** Stream audio from the model. Default `true`. */ stream?: boolean; /** Voice name to synthesize with (e.g. `'en-US-Neural2-F'`). Default `'en-US-Neural2-F'`. */ voice?: string; /** BCP-47 language code. Default `'en-US'`. */ languageCode?: string; /** Voice model family (e.g. `'neural2'`, `'wavenet'`, `'chirp3-hd'`). Must match the voice's family; omit (default `''`) to let the voice decide. Known families: standard, wavenet, neural2, news, polyglot, studio, chirp, chirp-hd, chirp3-hd. */ model?: GoogleTTSModel | string; /** Output audio sample rate in Hz. Default `24000`. */ sampleRate?: number; /** Speaking rate (1.0 = normal). Must be in `[0.25, 4.0]`. Default `null` (provider default). */ speakingRate?: number | null; /** Voice pitch in semitones (0 = normal). Must be in `[-20.0, 20.0]`. Default `null` (provider default). */ pitch?: number | null; /** Voice selection used as a fallback for `voice` and `languageCode` when those are left at their defaults. Default `null`. */ voiceConfig?: GoogleVoiceConfig | null; /** Additional/forward-compatible options. */ [key: string]: any; }; declare class GoogleTTSImpl extends TTS { static readonly displayName = "GoogleTTS"; _providerName: string; apiKey: string | null; voiceId: string; voice: string; languageCode: string; language: string; model: string; speakingRate: number | null; pitch: number | null; ttsServiceAccountJson: string | null; ttsStream: boolean; constructor(opts?: GoogleTTSOptions); private static _validateModel; private static _coerceToJsonContent; private static _resolveServiceAccountJson; getRuntimeConfig(): Record; } /** A configured Google Cloud TTS provider instance. */ export type GoogleTTS = GoogleTTSImpl; /** * Google Cloud text-to-speech (TTS) provider. * * The `model` family must be consistent with `voice`; mismatches throw, and * an unknown family is passed through (routing falls back to the voice name). */ export declare const GoogleTTS: (opts?: GoogleTTSOptions) => GoogleTTS; export {};