play_audio
Play audio files in WAV or MP3 format using the ElevenLabs MCP Server's audio processing capabilities.
Instructions
Play an audio file. Supports WAV and MP3 formats.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_file_path | Yes |
Implementation Reference
- elevenlabs_mcp/server.py:1099-1104 (handler)The handler function for the 'play_audio' tool. It processes the input file path using handle_input_file, plays the audio using elevenlabs.play, and returns a success message with the file path.@mcp.tool(description="Play an audio file. Supports WAV and MP3 formats.") def play_audio(input_file_path: str) -> TextContent: file_path = handle_input_file(input_file_path) play(open(file_path, "rb").read(), use_ffmpeg=False) return TextContent(type="text", text=f"Successfully played audio file: {file_path}")
- elevenlabs_mcp/server.py:1099-1099 (registration)The @mcp.tool decorator registers the play_audio function as an MCP tool with its description.@mcp.tool(description="Play an audio file. Supports WAV and MP3 formats.")