@yuchida-tamu/podcast-gen
Version:
AI-Powered Monologue Podcast Generator
97 lines • 2.49 kB
TypeScript
export interface MonologueSegment {
timestamp: string;
text: string;
emotion?: string;
duration: number;
}
export interface ScriptMetadata {
topic: string;
totalSegments: number;
estimatedDuration: number;
format: 'monologue';
version: string;
}
export interface ScriptOutput {
title: string;
generated: string;
duration: number;
segments: MonologueSegment[];
metadata: ScriptMetadata;
}
export interface NarratorConfig {
name: string;
personality: string;
voice: string;
systemPrompt: NarratorPrompt;
}
export interface NarratorPrompt {
personality: string;
formatInstructions: string;
}
export type NarrativePhase = 'introduction' | 'exploration' | 'conclusion';
export interface PhaseConfig {
description: string;
instructions: string;
targetPercentage: number;
}
export type NarrativePhases = Record<NarrativePhase, PhaseConfig>;
export interface ApiResponse {
content: Array<{
text: string;
}>;
}
export interface CliOptions {
duration: string;
output: string;
script: string;
openaiKey?: string;
}
export type ProgressStep = number;
export type ProgressMessage = string;
export type OutputFileType = 'Script (JSON)' | 'Audio';
export type ValidationResult = void;
export type TopicString = string;
export type DurationMinutes = 5 | 10;
export type ApiKey = string;
export interface LLMRequest {
systemPrompt: string;
userPrompt: string;
}
export interface LLMResponse {
content: string;
usage?: {
promptTokens: number;
completionTokens: number;
totalTokens: number;
};
}
export interface LLMConfig {
apiKey: string;
model: string;
maxTokens: number;
}
export interface APIClientConfig {
retries: number;
timeout: number;
baseDelay: number;
maxDelay: number;
}
export interface LLMService {
generateContent(request: LLMRequest): Promise<LLMResponse>;
isHealthy(): Promise<boolean>;
}
export declare class LLMError extends Error {
readonly code: string;
readonly retryable: boolean;
constructor(message: string, code: string, retryable?: boolean);
}
export declare class LLMAuthenticationError extends LLMError {
constructor(message?: string);
}
export declare class LLMRateLimitError extends LLMError {
constructor(message?: string);
}
export declare class LLMNetworkError extends LLMError {
constructor(message?: string);
}
//# sourceMappingURL=index.d.ts.map