import { listVoiceProviderMetadata } from "../voice/metadata/registry.js";
import "../voice/metadata/index.js";
//#region src/config/voice.ts
function toVoiceModels(values) {
	return (values ?? []).map((value) => ({
		id: value.id,
		name: value.name,
		...value.description ? { description: value.description } : {}
	}));
}
function getVoiceModelsConfig() {
	const config = {
		stt: {},
		tts: {},
		ttsVoices: {}
	};
	for (const metadata of listVoiceProviderMetadata()) {
		if (metadata.capability === "stt") {
			config.stt[metadata.id] = toVoiceModels(metadata.models);
			continue;
		}
		config.tts[metadata.id] = toVoiceModels(metadata.models);
		config.ttsVoices[metadata.id] = toVoiceModels(metadata.voices);
	}
	return config;
}
function getTTSProviders() {
	return listVoiceProviderMetadata("tts").map((metadata) => ({
		id: metadata.id,
		name: metadata.displayName,
		...metadata.description ? { description: metadata.description } : {}
	}));
}
function getTTSTriggerModes() {
	return [
		{
			id: "off",
			name: "Disabled",
			description: "TTS is completely disabled"
		},
		{
			id: "always",
			name: "Always",
			description: "Apply TTS to all messages"
		},
		{
			id: "inbound",
			name: "Inbound Audio",
			description: "Only when user sends voice message"
		},
		{
			id: "tagged",
			name: "Tagged",
			description: "Only when [[tts]] directive is used"
		}
	];
}
//#endregion
export { getTTSProviders, getTTSTriggerModes, getVoiceModelsConfig };

//# sourceMappingURL=voice.js.map