@clipwhisperer/common
Version:
ClipWhisperer Common - Shared library providing core utilities, database schemas, authentication, bucket management, and common functionality across all ClipWhisperer microservices
185 lines (184 loc) • 5 kB
TypeScript
/**
* AWS Polly Zod Schemas
* Centralized schema definitions for AWS Polly parameters
*/
import { z } from "zod";
/**
* Base AWS Polly voice schema
*/
export declare const awsPollyVoiceSchema: z.ZodDefault<z.ZodString>;
/**
* Base AWS Polly engine schema
*/
export declare const awsPollyEngineSchema: z.ZodDefault<z.ZodString>;
/**
* Base AWS Polly output format schema
*/
export declare const awsPollyOutputFormatSchema: z.ZodDefault<z.ZodEnum<["mp3", "ogg_vorbis", "pcm"]>>;
/**
* Standard AWS Polly request schema
*/
export declare const awsPollyRequestSchema: z.ZodObject<{
text: z.ZodString;
voiceId: z.ZodOptional<z.ZodDefault<z.ZodString>>;
engine: z.ZodOptional<z.ZodDefault<z.ZodString>>;
outputFormat: z.ZodOptional<z.ZodDefault<z.ZodEnum<["mp3", "ogg_vorbis", "pcm"]>>>;
}, "strip", z.ZodTypeAny, {
voiceId?: string;
engine?: string;
outputFormat?: "mp3" | "ogg_vorbis" | "pcm";
text?: string;
}, {
voiceId?: string;
engine?: string;
outputFormat?: "mp3" | "ogg_vorbis" | "pcm";
text?: string;
}>;
/**
* AWS Polly synthesis input schema (for services)
*/
export declare const awsPollySynthesisInputSchema: z.ZodObject<{
text: z.ZodString;
voiceId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
engine: z.ZodDefault<z.ZodOptional<z.ZodString>>;
outputFormat: z.ZodDefault<z.ZodOptional<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
voiceId?: string;
engine?: string;
outputFormat?: string;
text?: string;
}, {
voiceId?: string;
engine?: string;
outputFormat?: string;
text?: string;
}>;
/**
* AWS Polly metadata schema
*/
export declare const awsPollyMetadataSchema: z.ZodObject<{
voiceId: z.ZodString;
engine: z.ZodString;
outputFormat: z.ZodString;
duration: z.ZodOptional<z.ZodNumber>;
fileSize: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
duration?: number;
voiceId?: string;
engine?: string;
outputFormat?: string;
fileSize?: number;
}, {
duration?: number;
voiceId?: string;
engine?: string;
outputFormat?: string;
fileSize?: number;
}>;
/**
* Speech synthesis response schema
*/
export declare const speechSynthesisResponseSchema: z.ZodObject<{
audioId: z.ZodString;
audioUrl: z.ZodString;
speechMarks: z.ZodOptional<z.ZodArray<z.ZodObject<{
time: z.ZodNumber;
type: z.ZodEnum<["word", "sentence", "ssml"]>;
start: z.ZodNumber;
end: z.ZodNumber;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
value?: string;
type?: "word" | "sentence" | "ssml";
end?: number;
time?: number;
start?: number;
}, {
value?: string;
type?: "word" | "sentence" | "ssml";
end?: number;
time?: number;
start?: number;
}>, "many">>;
duration: z.ZodNumber;
wordCount: z.ZodNumber;
metadata: z.ZodObject<{
voiceId: z.ZodString;
engine: z.ZodString;
outputFormat: z.ZodString;
duration: z.ZodOptional<z.ZodNumber>;
fileSize: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
duration?: number;
voiceId?: string;
engine?: string;
outputFormat?: string;
fileSize?: number;
}, {
duration?: number;
voiceId?: string;
engine?: string;
outputFormat?: string;
fileSize?: number;
}>;
}, "strip", z.ZodTypeAny, {
duration?: number;
metadata?: {
duration?: number;
voiceId?: string;
engine?: string;
outputFormat?: string;
fileSize?: number;
};
audioId?: string;
audioUrl?: string;
speechMarks?: {
value?: string;
type?: "word" | "sentence" | "ssml";
end?: number;
time?: number;
start?: number;
}[];
wordCount?: number;
}, {
duration?: number;
metadata?: {
duration?: number;
voiceId?: string;
engine?: string;
outputFormat?: string;
fileSize?: number;
};
audioId?: string;
audioUrl?: string;
speechMarks?: {
value?: string;
type?: "word" | "sentence" | "ssml";
end?: number;
time?: number;
start?: number;
}[];
wordCount?: number;
}>;
/**
* Reusable AWS Polly configuration object schema
*/
export declare const awsPollyConfigSchema: z.ZodObject<{
voiceId: z.ZodDefault<z.ZodString>;
engine: z.ZodDefault<z.ZodString>;
outputFormat: z.ZodDefault<z.ZodEnum<["mp3", "ogg_vorbis", "pcm"]>>;
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
retries: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
}, "strip", z.ZodTypeAny, {
voiceId?: string;
engine?: string;
outputFormat?: "mp3" | "ogg_vorbis" | "pcm";
timeout?: number;
retries?: number;
}, {
voiceId?: string;
engine?: string;
outputFormat?: "mp3" | "ogg_vorbis" | "pcm";
timeout?: number;
retries?: number;
}>;