mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 03:40:22 +00:00
fix(tts): split shared tts config types
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// Shared speech-provider implementation helpers for bundled and third-party plugins.
|
||||
|
||||
export type { SpeechProviderPlugin } from "../plugins/types.js";
|
||||
export type { ResolvedTtsConfig, ResolvedTtsModelOverrides } from "../tts/tts-types.js";
|
||||
export type {
|
||||
SpeechDirectiveTokenParseContext,
|
||||
SpeechDirectiveTokenParseResult,
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
normalizeOptionalLowercaseString,
|
||||
normalizeOptionalString,
|
||||
} from "../shared/string-coerce.js";
|
||||
import type { ResolvedTtsConfig } from "./tts.js";
|
||||
import type { ResolvedTtsConfig } from "./tts-types.js";
|
||||
|
||||
const TEMP_FILE_CLEANUP_DELAY_MS = 5 * 60 * 1000; // 5 minutes
|
||||
|
||||
|
||||
20
src/tts/tts-types.ts
Normal file
20
src/tts/tts-types.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
||||
import type { TtsAutoMode, TtsConfig, TtsMode, TtsProvider } from "../config/types.tts.js";
|
||||
import type { SpeechModelOverridePolicy, SpeechProviderConfig } from "./provider-types.js";
|
||||
|
||||
export type ResolvedTtsModelOverrides = SpeechModelOverridePolicy;
|
||||
|
||||
export type ResolvedTtsConfig = {
|
||||
auto: TtsAutoMode;
|
||||
mode: TtsMode;
|
||||
provider: TtsProvider;
|
||||
providerSource: "config" | "default";
|
||||
summaryModel?: string;
|
||||
modelOverrides: ResolvedTtsModelOverrides;
|
||||
providerConfigs: Record<string, SpeechProviderConfig>;
|
||||
prefsPath?: string;
|
||||
maxTextLength: number;
|
||||
timeoutMs: number;
|
||||
rawConfig?: TtsConfig;
|
||||
sourceConfig?: OpenClawConfig;
|
||||
};
|
||||
Reference in New Issue
Block a user