minimax-mcp-tools
Version:
Async MCP server with Minimax API integration for image generation and text-to-speech
151 lines • 5.28 kB
TypeScript
export interface ModelConfig {
name: string;
description: string;
}
export interface VoiceConfig {
name: string;
gender: 'male' | 'female' | 'other';
language: 'zh' | 'en';
}
export interface RateLimit {
rpm: number;
burst: number;
}
export interface ApiConfig {
BASE_URL: string;
ENDPOINTS: {
IMAGE_GENERATION: string;
TEXT_TO_SPEECH: string;
};
HEADERS: {
'MM-API-Source': string;
};
TIMEOUT: number;
}
export interface ImageConstraints {
PROMPT_MAX_LENGTH: number;
MAX_IMAGES: number;
MIN_DIMENSION: number;
MAX_DIMENSION: number;
DIMENSION_STEP: number;
ASPECT_RATIOS: readonly string[];
STYLE_TYPES: readonly string[];
RESPONSE_FORMATS: readonly string[];
SUBJECT_TYPES: readonly string[];
STYLE_WEIGHT_MIN: number;
STYLE_WEIGHT_MAX: number;
}
export interface TTSConstraints {
TEXT_MAX_LENGTH: number;
SPEED_MIN: number;
SPEED_MAX: number;
VOLUME_MIN: number;
VOLUME_MAX: number;
PITCH_MIN: number;
PITCH_MAX: number;
EMOTIONS: readonly string[];
FORMATS: readonly string[];
SAMPLE_RATES: readonly number[];
BITRATES: readonly number[];
VOICE_MODIFY_PITCH_MIN: number;
VOICE_MODIFY_PITCH_MAX: number;
VOICE_MODIFY_INTENSITY_MIN: number;
VOICE_MODIFY_INTENSITY_MAX: number;
VOICE_MODIFY_TIMBRE_MIN: number;
VOICE_MODIFY_TIMBRE_MAX: number;
SOUND_EFFECTS: readonly string[];
}
export interface ImageDefaults {
model: string;
aspectRatio: string;
n: number;
promptOptimizer: boolean;
responseFormat: string;
styleWeight: number;
}
export interface TTSDefaults {
model: string;
voiceId: string;
speed: number;
volume: number;
pitch: number;
emotion: string;
format: string;
sampleRate: number;
bitrate: number;
channel: number;
}
export declare const API_CONFIG: ApiConfig;
export declare const RATE_LIMITS: Record<'IMAGE' | 'TTS', RateLimit>;
export declare const MODELS: Record<'IMAGE' | 'TTS', Record<string, ModelConfig>>;
export declare const VOICES: Record<string, VoiceConfig>;
export declare const CONSTRAINTS: {
readonly IMAGE: {
readonly PROMPT_MAX_LENGTH: 1500;
readonly MAX_IMAGES: 9;
readonly MIN_DIMENSION: 512;
readonly MAX_DIMENSION: 2048;
readonly DIMENSION_STEP: 8;
readonly ASPECT_RATIOS: readonly ["1:1", "16:9", "4:3", "3:2", "2:3", "3:4", "9:16", "21:9"];
readonly STYLE_TYPES: readonly ["漫画", "元气", "中世纪", "水彩"];
readonly RESPONSE_FORMATS: readonly ["url", "base64"];
readonly SUBJECT_TYPES: readonly ["character"];
readonly STYLE_WEIGHT_MIN: 0.01;
readonly STYLE_WEIGHT_MAX: 1;
};
readonly TTS: {
readonly TEXT_MAX_LENGTH: 10000;
readonly SPEED_MIN: 0.5;
readonly SPEED_MAX: 2;
readonly VOLUME_MIN: 0.1;
readonly VOLUME_MAX: 10;
readonly PITCH_MIN: -12;
readonly PITCH_MAX: 12;
readonly EMOTIONS: readonly ["neutral", "happy", "sad", "angry", "fearful", "disgusted", "surprised"];
readonly FORMATS: readonly ["mp3", "wav", "flac", "pcm"];
readonly SAMPLE_RATES: readonly ["8000", "16000", "22050", "24000", "32000", "44100"];
readonly BITRATES: readonly ["64000", "96000", "128000", "160000", "192000", "224000", "256000", "320000"];
readonly VOICE_MODIFY_PITCH_MIN: -100;
readonly VOICE_MODIFY_PITCH_MAX: 100;
readonly VOICE_MODIFY_INTENSITY_MIN: -100;
readonly VOICE_MODIFY_INTENSITY_MAX: 100;
readonly VOICE_MODIFY_TIMBRE_MIN: -100;
readonly VOICE_MODIFY_TIMBRE_MAX: 100;
readonly SOUND_EFFECTS: readonly ["spacious_echo", "auditorium_echo", "lofi_telephone", "robotic"];
};
};
export declare const DEFAULTS: {
readonly IMAGE: {
readonly model: "image-01";
readonly aspectRatio: "1:1";
readonly n: 1;
readonly promptOptimizer: true;
readonly responseFormat: "url";
readonly styleWeight: 0.8;
};
readonly TTS: {
readonly model: "speech-2.6-hd";
readonly voiceId: "female-shaonv";
readonly speed: 1;
readonly volume: 1;
readonly pitch: 0;
readonly emotion: "neutral";
readonly format: "mp3";
readonly sampleRate: "32000";
readonly bitrate: "128000";
readonly channel: 1;
};
};
export type ImageModel = keyof typeof MODELS.IMAGE;
export type TTSModel = keyof typeof MODELS.TTS;
export type VoiceId = keyof typeof VOICES;
export type AspectRatio = typeof CONSTRAINTS.IMAGE.ASPECT_RATIOS[number];
export type StyleType = typeof CONSTRAINTS.IMAGE.STYLE_TYPES[number];
export type ResponseFormat = typeof CONSTRAINTS.IMAGE.RESPONSE_FORMATS[number];
export type SubjectType = typeof CONSTRAINTS.IMAGE.SUBJECT_TYPES[number];
export type Emotion = typeof CONSTRAINTS.TTS.EMOTIONS[number];
export type AudioFormat = typeof CONSTRAINTS.TTS.FORMATS[number];
export type SampleRate = typeof CONSTRAINTS.TTS.SAMPLE_RATES[number];
export type Bitrate = typeof CONSTRAINTS.TTS.BITRATES[number];
export type SoundEffect = typeof CONSTRAINTS.TTS.SOUND_EFFECTS[number];
//# sourceMappingURL=constants.d.ts.map