/** * TTS directive parser. * * Parses `[[tts:key=value]]` and `[[tts:text]]...[[/tts:text]]` blocks. * * Per-provider key handling (voice/model/speed) is delegated to each * `SpeechProviderPlugin.parseDirectiveToken`. The parser: * 1. Pulls out the `text` block and the global `provider` token here (these * are cross-provider concerns). * 2. For every other token, asks each registered provider via * `parseDirectiveToken({ key, value, policy })`. The first provider whose * result has `handled === true` wins; its returned overrides are merged * into `overrides[provider.id]`. * 3. Tokens that no provider handles produce a warning (helps catch typos). * * Adding a new provider with a new directive key (e.g. `[[tts:emotion=happy]]`) * requires no change to this file — the provider's own `parseDirectiveToken` * declares which keys it owns. */ import './providers/index.js'; import type { TTSModelOverrideConfig, TtsDirectiveParseResult } from './types.js'; export declare function parseTtsDirectives(text: string, policy?: TTSModelOverrideConfig): TtsDirectiveParseResult; export declare function hasTtsDirectives(text: string): boolean; export declare function stripTtsDirectives(text: string): string; export declare function buildTtsSystemPromptHint(config: { enabled: boolean; trigger: string; maxTextLength?: number; modelOverrides?: TTSModelOverrideConfig; /** Current channel id (e.g. telegram) for output format hint */ channel?: string; /** Preferred audio format for this channel when known */ channelAudioFormat?: string; /** Whether voice-note style delivery is supported */ channelVoiceBubble?: boolean; /** `text_to_speech` tool is registered */ textToSpeechTool?: boolean; }): string | undefined;