get_voices
Retrieve a list of available voices with their capabilities and supported features for text-to-speech synthesis, enabling users to select the best fit for expressive and professional speech output.
Instructions
Get list of available voices with their capabilities and supported features
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- src/typescript/index.ts:776-805 (handler)MCP tool handler for 'get_voices': calls ttsServer.getVoices() and returns formatted markdown response with voices list, emotions, pacing styles, supported formats, and capabilities.case 'get_voices': const voices = ttsServer.getVoices(); const voiceList = voices.voices.map(v => `**${v.name}** (${v.voiceId}) - ${v.description}` ).join('\n'); const emotionList = voices.emotions.map(e => `**${e.emotion}** - ${e.description}` ).join('\n'); const pacingList = voices.pacingStyles.map(p => `**${p.pacing}** - ${p.description}` ).join('\n'); return { content: [ { type: 'text', text: `🎙️ **Available Voices & Capabilities**\n\n` + `## Voices (${voices.voices.length})\n${voiceList}\n\n` + `## Emotions (${voices.emotions.length})\n${emotionList}\n\n` + `## Pacing Styles (${voices.pacingStyles.length})\n${pacingList}\n\n` + `## Supported Formats\n${voices.supportedFormats.join(', ')}\n\n` + `## Capabilities\n` + `- **Speed Range:** ${voices.capabilities.speedRange.join(' - ')}x\n` + `- **Volume Range:** ${voices.capabilities.volumeRange.join(' - ')}x\n` + `- **Max Text Length:** ${voices.capabilities.maxTextLength.toLocaleString()} characters`, }, ], };
- src/typescript/index.ts:453-480 (handler)Core getVoices() method in AdvancedTTSServer class: returns structured data for available voices (from AvailableVoices), emotions (VoiceEmotions), pacing styles (PacingStyles), formats (AudioFormats), and capabilities.getVoices() { return { success: true, voices: Object.entries(AvailableVoices).map(([id, info]) => ({ voiceId: id, name: info.name, gender: info.gender, description: info.description, language: 'en-us', sampleRate: 24000, quality: 'high' })), emotions: Object.entries(VoiceEmotions).map(([key, value]) => ({ emotion: key, description: value.description })), pacingStyles: Object.entries(PacingStyles).map(([key, value]) => ({ pacing: key, description: value.description })), supportedFormats: [...AudioFormats], capabilities: { speedRange: [0.25, 3.0], volumeRange: [0.1, 2.0], maxTextLength: this.config.maxTextLength } }; }
- src/typescript/index.ts:699-706 (registration)Tool registration in ListToolsRequestSchema handler: defines 'get_voices' tool with description and empty inputSchema (no required parameters).{ name: 'get_voices', description: 'Get list of available voices with their capabilities and supported features', inputSchema: { type: 'object', properties: {}, }, },
- src/typescript/index.ts:702-706 (schema)Input schema for 'get_voices' tool: empty object schema indicating no input parameters are required.inputSchema: { type: 'object', properties: {}, }, },
- src/typescript/index.ts:69-80 (helper)Hardcoded AvailableVoices constant providing voice metadata used by getVoices() to populate the voices list.const AvailableVoices = { af_heart: { name: 'Heart', gender: 'female', description: 'Warm, friendly female voice' }, af_sky: { name: 'Sky', gender: 'female', description: 'Clear, bright female voice' }, af_bella: { name: 'Bella', gender: 'female', description: 'Elegant, sophisticated female voice' }, af_sarah: { name: 'Sarah', gender: 'female', description: 'Professional, confident female voice' }, af_nicole: { name: 'Nicole', gender: 'female', description: 'Gentle, soothing female voice' }, am_adam: { name: 'Adam', gender: 'male', description: 'Strong, authoritative male voice' }, am_michael: { name: 'Michael', gender: 'male', description: 'Friendly, approachable male voice' }, bf_emma: { name: 'Emma', gender: 'female', description: 'Young, energetic female voice' }, bf_isabella: { name: 'Isabella', gender: 'female', description: 'Mature, expressive female voice' }, bm_lewis: { name: 'Lewis', gender: 'male', description: 'Deep, resonant male voice' }, } as const;