UNPKG

coze-plugin-utils

Version:

Comprehensive utility library for Coze plugins with multimedia processing, browser automation, cloud storage integration, and AI-powered video/audio generation capabilities

98 lines (97 loc) 2.15 kB
export interface IJWTConfig { appId: string; userId: string; keyid: string; privateKey: string; } export interface IWorkflows { [key: string]: string; fileUploader: string; } export interface IOSSConfig { oss: { bucket: string; region: string; accessKeyId: string; accessKeySecret: string; cdnUrl: string; }; } export interface IBrowserConfig { apiKey: string; } export interface IViduConfig { apiKey: string; } export interface IAzureConfig { speech: { key: string; region: string; }; } export interface IMinimaxConfig { apiKey: string; groupId: string; } export interface IGlobalConfig { baseUrl: string; workflows?: IWorkflows; jwt?: IJWTConfig; aliyun?: IOSSConfig; browser?: IBrowserConfig; vidu?: IViduConfig; azure?: IAzureConfig; minimax?: IMinimaxConfig; } export interface IGenerateVoiceOptions { voiceName: string; text: string; withFrontend?: boolean; speed?: number; pitch?: number; volumn?: number; emotion?: EVoiceEmotion; } export declare enum EVoiceEmotion { happy = "happy",// "sad", "angry", "fearful", "disgusted", "surprised", "neutral" sad = "sad", angry = "angry", fearful = "fearful", disgusted = "disgusted", surprised = "surprised", neutral = "neutral" } export interface SceneItem { url: string; duration: number; subtitle?: string; subtitlePosition?: 'top' | 'middle' | 'bottom'; subtitleDelay?: number; subtitleFontSize?: number; audio?: string; audioDelay?: number; } export interface IAssSongPart { words: { end_time: number; start_time: number; text: string; }[]; text: string; translation?: string; startTime: number; endTime: number; } export interface KenBurnsOptions { scenes: SceneItem[]; resolution?: string; fadeDuration?: number; fps?: number; enableShake?: boolean; shakeIntensity?: number; subtitles?: { title: string; author: string; sentences: IAssSongPart[]; }; }