import { d as Model, n as Api } from "./types-D7a857tt.js";
import { i as NodmixConfig } from "./types.nodmix-B9QJSty6.js";
import { c as normalizeOptionalString } from "./string-coerce-Rv-c17oH.js";
import { Bs as requireApiKey, Co as SpeechSynthesisStreamResult, Do as TtsDirectiveOverrides, Eo as SpeechVoiceOption, Ic as resolveModelAsync, Kn as SpeechProviderPlugin, Oo as TtsDirectiveParseResult, Os as getApiKeyForModel, So as SpeechSynthesisStreamRequest, To as SpeechTelephonySynthesisRequest, _o as SpeechProviderPreparedSynthesis, ao as resolveEffectiveTtsConfig, bo as SpeechProviderResolveTalkOverridesContext, co as SpeechDirectiveTokenParseContext, do as SpeechModelOverridePolicy, fo as SpeechProviderConfig, go as SpeechProviderPrepareSynthesisContext, ho as SpeechProviderOverrides, io as TtsConfigResolutionContext, lo as SpeechDirectiveTokenParseResult, no as ResolvedTtsConfig, oo as TTS_AUTO_MODES, po as SpeechProviderConfiguredContext, ro as ResolvedTtsModelOverrides, so as normalizeTtsAutoMode, uo as SpeechListVoicesRequest, vo as SpeechProviderResolveConfigContext, wo as SpeechSynthesisTarget, xo as SpeechSynthesisRequest, yo as SpeechProviderResolveTalkConfigContext } from "./types-CLo6hM78.js";
import { t as asBoolean } from "./boolean-Bvf5Mi81.js";
import { r as completeSimple } from "./stream-Bk_N19pz.js";
import { o as asFiniteNumber } from "./number-coercion-Cl6rhWj6.js";
import { a as createProviderHttpError, c as formatProviderErrorPayload, h as truncateErrorDetail, l as formatProviderHttpErrorMessage, m as readResponseTextLimited, o as extractProviderErrorDetail, r as assertOkOrThrowProviderError, s as extractProviderRequestId, t as asObject } from "./provider-http-errors-BeY-Xbna.js";
import { a as normalizeSpeechProviderId, c as normalizeLanguageCode, d as scheduleCleanup, i as listSpeechProviders, l as normalizeSeed, n as getSpeechProvider, o as parseTtsDirectives, r as listLoadedSpeechProviders, s as normalizeApplyTextNormalization, t as canonicalizeSpeechProviderId, u as requireInRange } from "./provider-registry-CkGQWEhf.js";

//#region src/agents/simple-completion-transport.d.ts
declare function prepareModelForSimpleCompletion<TApi extends Api>(params: {
  model: Model<TApi>;
  cfg?: NodmixConfig;
}): Model;
//#endregion
//#region src/tts/tts-core.d.ts
type SummarizeTextDeps = {
  completeSimple: typeof completeSimple;
  getApiKeyForModel: typeof getApiKeyForModel;
  prepareModelForSimpleCompletion: typeof prepareModelForSimpleCompletion;
  requireApiKey: typeof requireApiKey;
  resolveModelAsync: typeof resolveModelAsync;
};
type SummarizeResult = {
  summary: string;
  latencyMs: number;
  inputLength: number;
  outputLength: number;
};
declare function summarizeText(params: {
  text: string;
  targetLength: number;
  cfg: NodmixConfig;
  config: ResolvedTtsConfig;
  timeoutMs: number;
}, deps?: SummarizeTextDeps): Promise<SummarizeResult>;
//#endregion
//#region src/tts/directive-number.d.ts
type DirectiveNumberRange = {
  min?: number;
  max?: number;
  minExclusive?: boolean;
  maxExclusive?: boolean;
};
declare function parseSpeechDirectiveNumberOverride(params: {
  ctx: SpeechDirectiveTokenParseContext;
  overrideKey: string;
  range: DirectiveNumberRange;
  warning: (value: string) => string;
  mergeCurrentOverrides?: boolean;
}): SpeechDirectiveTokenParseResult;
//#endregion
export { type ResolvedTtsConfig, type ResolvedTtsModelOverrides, type SpeechDirectiveTokenParseContext, type SpeechDirectiveTokenParseResult, type SpeechListVoicesRequest, type SpeechModelOverridePolicy, type SpeechProviderConfig, type SpeechProviderConfiguredContext, type SpeechProviderOverrides, type SpeechProviderPlugin, type SpeechProviderPrepareSynthesisContext, type SpeechProviderPreparedSynthesis, type SpeechProviderResolveConfigContext, type SpeechProviderResolveTalkConfigContext, type SpeechProviderResolveTalkOverridesContext, type SpeechSynthesisRequest, type SpeechSynthesisStreamRequest, type SpeechSynthesisStreamResult, type SpeechSynthesisTarget, type SpeechTelephonySynthesisRequest, type SpeechVoiceOption, TTS_AUTO_MODES, type TtsConfigResolutionContext, type TtsDirectiveOverrides, type TtsDirectiveParseResult, asBoolean, asFiniteNumber, asObject, assertOkOrThrowProviderError, canonicalizeSpeechProviderId, createProviderHttpError, extractProviderErrorDetail, extractProviderRequestId, formatProviderErrorPayload, formatProviderHttpErrorMessage, getSpeechProvider, listLoadedSpeechProviders, listSpeechProviders, normalizeApplyTextNormalization, normalizeLanguageCode, normalizeSeed, normalizeSpeechProviderId, normalizeTtsAutoMode, parseSpeechDirectiveNumberOverride, parseTtsDirectives, readResponseTextLimited, requireInRange, resolveEffectiveTtsConfig, scheduleCleanup, summarizeText, normalizeOptionalString as trimToUndefined, truncateErrorDetail };