speech-provider
Version:
A unified interface for browser speech synthesis and Eleven Labs voices
33 lines • 1.06 kB
JavaScript
import { z } from "zod";
/**
* Zod schema for validating ElevenLabs voice data.
* This schema ensures that the API response matches the expected format.
*/
export const ElevenLabsVoiceDataSchema = z
.object({
voice_id: z.string(),
name: z.string().optional(),
description: z.string().nullable(),
category: z.enum(["premade", "professional"]),
labels: z.object({
accent: z.string(),
age: z.string(),
gender: z.string(),
language: z.string().optional(),
use_case: z.enum(["social media"]),
}),
preview_url: z.string(),
samples: z.null(),
settings: z.null(),
sharing: z.null(),
safety_control: z.null(),
fine_tuning: z.record(z.any()),
is_legacy: z.literal(false),
is_mixed: z.literal(false),
high_quality_base_model_ids: z.array(z.string()),
available_for_tiers: z.array(z.enum(["plus", "pro", "enterprise"])),
voice_verification: z.record(z.any()),
permission_on_resource: z.null(),
})
.strict();
//# sourceMappingURL=ElevenLabsTypes.js.map