Skip to main content
Glama

MCP FishAudio Server

by da-okazaki
auto-play-example.md1.58 kB
# Auto-Play Feature Examples ## Environment Variable Configuration ### Enable auto-play by default ```json { "mcpServers": { "fish-audio": { "command": "npx", "args": ["@alanse/fish-audio-mcp-server"], "env": { "FISH_API_KEY": "your_api_key", "FISH_AUTO_PLAY": "true" } } } } ``` ## Usage Examples ### Basic auto-play ``` User: "Generate and play speech saying 'Hello, world!'" Claude: I'll generate and automatically play the speech for you. [Uses fish_audio_tts tool with auto_play: true] Result: Audio file generated and played automatically ``` ### Override default behavior ``` User: "Generate speech without playing: 'This is a test'" Claude: I'll generate the speech without automatic playback. [Uses fish_audio_tts tool with auto_play: false] Result: Audio file saved without playback ``` ### Streaming with auto-play ``` User: "Stream and play a long speech about AI" Claude: I'll stream the speech and play it once generation is complete. [Uses fish_audio_tts tool with streaming: true, auto_play: true] Result: Audio streamed to file and played upon completion ``` ## Platform Support - **macOS**: Uses `afplay` command - **Windows**: Uses PowerShell Media.SoundPlayer - **Linux**: Tries `aplay`, `mpg123`, or `ffplay` in order ## Notes - Audio playback happens after the file is fully generated - For streaming mode, playback occurs after the stream completes - Playback errors are logged but don't fail the TTS operation - The response includes `played: true/false` to indicate if playback occurred

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/da-okazaki/mcp-fish-audio-server'

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