/** * Shared types for LangVoice tools */ /** * Base result interface for all tool operations */ interface BaseToolResult { success: boolean; error?: string; } /** * Result from TTS generation tools */ interface TTSResult extends BaseToolResult { audioBase64?: string; audioBuffer?: Buffer; duration?: number; generationTime?: number; charactersProcessed?: number; } /** * Result from list voices tool */ interface VoicesResult extends BaseToolResult { voices?: VoiceInfo[]; } /** * Result from list languages tool */ interface LanguagesResult extends BaseToolResult { languages?: LanguageInfo[]; } /** * Voice information */ interface VoiceInfo { id: string; name: string; gender?: string; language?: string; description?: string; } /** * Language information */ interface LanguageInfo { id: string; name: string; voices?: string[]; } /** * Input for text-to-speech generation */ interface TTSInput { text: string; voice?: string; language?: string; speed?: number; } /** * Input for multi-voice generation */ interface MultiVoiceInput { text: string; language?: string; speed?: number; } /** * JSON Schema property definition */ interface SchemaProperty { type: string; description?: string; enum?: string[]; default?: unknown; minimum?: number; maximum?: number; } /** * Function parameters schema */ interface FunctionParameters { type: 'object'; properties: Record; required: string[]; [key: string]: unknown; } /** * Function schema definition */ interface FunctionSchema { name: string; description: string; parameters: FunctionParameters; } /** * OpenAI tool definition format */ interface OpenAIToolDefinition { type: 'function'; function: FunctionSchema; } /** * OpenAI tool call format */ interface OpenAIToolCall { id: string; type: 'function'; function: { name: string; arguments: string; }; } /** * AutoGen function definition */ interface AutoGenFunctionDef { name: string; description: string; parameters: FunctionParameters; } /** * AutoGen tool configuration */ interface AutoGenToolConfig { functions: AutoGenFunctionDef[]; } /** * AutoGen function call */ interface AutoGenFunctionCall { name: string; arguments: Record | string; } /** * LangChain tool input schema */ interface LangChainInputSchema { type: 'object'; properties: Record; required?: string[]; } /** * LangChain tool metadata */ interface LangChainToolMetadata { name: string; description: string; schema?: LangChainInputSchema; } /** * Tool name constants */ declare const TOOL_NAMES: { readonly TTS: "langvoice_text_to_speech"; readonly MULTI_VOICE: "langvoice_multi_voice_speech"; readonly LIST_VOICES: "langvoice_list_voices"; readonly LIST_LANGUAGES: "langvoice_list_languages"; }; type ToolName = (typeof TOOL_NAMES)[keyof typeof TOOL_NAMES]; /** * Available voices */ declare const VOICES: { readonly AMERICAN: readonly ["heart", "bella", "nicole", "sarah", "nova", "sky", "jessica", "river", "michael", "fenrir", "eric", "liam", "onyx", "adam"]; readonly BRITISH: readonly ["emma", "isabella", "alice", "lily", "george", "fable", "lewis", "daniel"]; }; declare const ALL_VOICES: readonly ["heart", "bella", "nicole", "sarah", "nova", "sky", "jessica", "river", "michael", "fenrir", "eric", "liam", "onyx", "adam", "emma", "isabella", "alice", "lily", "george", "fable", "lewis", "daniel"]; /** * Supported languages */ declare const LANGUAGES: readonly ["american_english", "british_english", "spanish", "french", "hindi", "italian", "japanese", "brazilian_portuguese", "mandarin_chinese"]; type VoiceId = (typeof ALL_VOICES)[number]; type LanguageId = (typeof LANGUAGES)[number]; export { ALL_VOICES, type AutoGenFunctionCall, type AutoGenFunctionDef, type AutoGenToolConfig, type BaseToolResult, type FunctionParameters, type FunctionSchema, LANGUAGES, type LangChainInputSchema, type LangChainToolMetadata, type LanguageId, type LanguageInfo, type LanguagesResult, type MultiVoiceInput, type OpenAIToolCall, type OpenAIToolDefinition, type SchemaProperty, TOOL_NAMES, type TTSInput, type TTSResult, type ToolName, VOICES, type VoiceId, type VoiceInfo, type VoicesResult };