Files
openclaw/src/plugin-sdk/speech.ts
2026-04-26 09:42:38 +05:30

58 lines
1.7 KiB
TypeScript

// Public speech helpers for bundled or third-party plugins.
//
// Keep this surface provider-facing: types, validation, directive parsing, and
// registry helpers. Runtime synthesis lives on `api.runtime.tts` or narrower
// core/runtime seams, not here.
export type { SpeechProviderPlugin } from "../plugins/types.js";
export type {
SpeechDirectiveTokenParseContext,
SpeechDirectiveTokenParseResult,
SpeechListVoicesRequest,
SpeechModelOverridePolicy,
SpeechProviderConfig,
SpeechProviderConfiguredContext,
SpeechProviderPreparedSynthesis,
SpeechProviderPrepareSynthesisContext,
SpeechProviderResolveConfigContext,
SpeechProviderResolveTalkConfigContext,
SpeechProviderResolveTalkOverridesContext,
SpeechProviderOverrides,
SpeechSynthesisRequest,
SpeechSynthesisTarget,
SpeechTelephonySynthesisRequest,
SpeechVoiceOption,
TtsDirectiveOverrides,
TtsDirectiveParseResult,
} from "../tts/provider-types.js";
export { parseTtsDirectives } from "../tts/directives.js";
export {
canonicalizeSpeechProviderId,
getSpeechProvider,
listSpeechProviders,
normalizeSpeechProviderId,
} from "../tts/provider-registry.js";
export { normalizeTtsAutoMode, TTS_AUTO_MODES } from "../tts/tts-auto-mode.js";
export {
asBoolean,
asFiniteNumber,
asObject,
assertOkOrThrowProviderError,
createProviderHttpError,
extractProviderErrorDetail,
extractProviderRequestId,
formatProviderHttpErrorMessage,
formatProviderErrorPayload,
readResponseTextLimited,
trimToUndefined,
truncateErrorDetail,
} from "../agents/provider-http-errors.js";
export {
normalizeApplyTextNormalization,
normalizeLanguageCode,
normalizeSeed,
requireInRange,
scheduleCleanup,
} from "../tts/tts-provider-helpers.js";