Skip to main content
Glama

MiniMax MCP JS

Official
by MiniMax-AI
voice.ts1.44 kB
import { MiniMaxAPI } from '../utils/api.js'; import { ListVoicesRequest } from '../types/index.js'; import { MinimaxRequestError } from '../exceptions/index.js'; export class VoiceAPI { private api: MiniMaxAPI; constructor(api: MiniMaxAPI) { this.api = api; } /** * List all available voices * @param request Request parameters * @returns Voice list information */ async listVoices(request: ListVoicesRequest = {}): Promise<{ systemVoices: string[], voiceCloneVoices: string[] }> { try { // Send request const response = await this.api.post<any>('/v1/get_voice', { voice_type: request.voiceType || 'all' }); // Process response const systemVoices = response?.system_voice || []; const voiceCloneVoices = response?.voice_cloning || []; // Format voice information const systemVoiceList: string[] = []; const voiceCloneVoiceList: string[] = []; for (const voice of systemVoices) { systemVoiceList.push(`Name: ${voice.voice_name}, ID: ${voice.voice_id}`); } for (const voice of voiceCloneVoices) { voiceCloneVoiceList.push(`Name: ${voice.voice_name}, ID: ${voice.voice_id}`); } return { systemVoices: systemVoiceList, voiceCloneVoices: voiceCloneVoiceList }; } catch (error) { throw new MinimaxRequestError(`Failed to list voices: ${String(error)}`); } } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MiniMax-AI/MiniMax-MCP-JS'

If you have feedback or need assistance with the MCP directory API, please join our Discord server