listAudioVoices
Discover available text-to-speech voices to select the right audio option for your content generation needs.
Instructions
List all available audio voices for text-to-speech generation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/services/audioService.js:95-119 (handler)The core handler function implementing listAudioVoices tool logic, returning a hardcoded list of available TTS voices./** * List available audio voices * * @returns {Promise<Object>} - Object containing the list of available voice options */ export async function listAudioVoices() { // Return the complete list of available voices const voices = [ "alloy", "echo", "fable", "onyx", "nova", "shimmer", "coral", "verse", "ballad", "ash", "sage", "amuch", "dan" ]; return { voices }; }
- src/services/audioSchema.js:33-43 (schema)JSON schema defining the listAudioVoices tool, including name, description, and empty input schema (no parameters required)./** * Schema for the listAudioVoices tool */ export const listAudioVoicesSchema = { name: 'listAudioVoices', description: 'List all available audio voices for text-to-speech generation', inputSchema: { type: 'object', properties: {} } };
- pollinations-mcp-server.js:329-344 (registration)MCP server dispatch handler that executes listAudioVoices tool upon matching tool name and formats the response.} else if (name === 'listAudioVoices') { try { const result = await listAudioVoices(); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error listing audio voices: ${error.message}` } ], isError: true }; }
- src/schemas.js:28-44 (registration)Central function registering all tool schemas (including listAudioVoicesSchema) for the MCP ListTools endpoint./** * Get all tool schemas as an array * @returns {Array} Array of all tool schemas */ export function getAllToolSchemas() { return [ generateImageUrlSchema, generateImageSchema, editImageSchema, generateImageFromReferenceSchema, listImageModelsSchema, respondAudioSchema, listAudioVoicesSchema, respondTextSchema, listTextModelsSchema ]; }