dosugamea_voicevox_mcp_server

dosugamea_voicevox_mcp_server

by Dosugamea
A server enabling VOICEVOX-compatible voice synthesis via MCP for use with AI agents like Claude 3.7.

Voicevox MCP Server for AI Voice Synthesis

The Voicevox MCP Server is a server that enables the use of VOICEVOX-compatible voice synthesis engines (such as AivisSpeech, VOICEVOX, and COEIROINK) via the Model Context Protocol (MCP). It is designed to facilitate voice synthesis in agent mode using Claude 3.7, particularly in tools like Cursor.

Overview

This server allows seamless integration of VOICEVOX voice synthesis capabilities into applications that utilize the MCP. It is particularly useful for developers working on AI-driven voice synthesis projects.

Prerequisites

Windows Environment

  • Node.js 18 or higher
  • VOICEVOX ENGINE (running locally at http://localhost:50000)
  • VLC Media Player (must be accessible via PATH)

Docker Environment (WSL2)

  • Docker and Docker Compose
  • WSL2
  • VOICEVOX ENGINE (running locally or in Docker)
  • Linux environment with libsdl2-dev, pulseaudio-utils, and pulseaudio installed
  • Access to /mnt/wslg

Installation and Setup

  1. Clone the repository:
    bash git clone https://github.com/Dosugamea/voicevox-mcp-server.git cd voicevox-mcp-server

  2. Install dependencies:
    bash npm install

  3. Configure environment variables by copying .env_example to .env and modifying it as needed:
    env VOICEVOX_API_URL=http://localhost:50021 VOICEVOX_SPEAKER_ID=1

Usage

Running on Windows

To start the server on Windows:

npm run build
npm start

Running on Docker

The server runs in stdio mode when using Docker, so no additional commands are needed.

Configuration

Windows Configuration

Add the following to your mcp.json file:

"voicevox": {
    "url": "http://localhost:10100/sse"
}

Docker Configuration

Add the following to your mcp.json file (note: this has not been fully tested in the author's environment):

{
    "tools": {
        "voicevox": {
            "command": "cmd",
            "args": [
                "/c",
                "docker",
                "run",
                "-i",
                "--rm",
                "-v",
                "/mnt/wslg:/mnt/wslg",
                "-e",
                "PULSE_SERVER",
                "-e",
                "SDL_AUDIODRIVER",
                "-e",
                "VOICEVOX_API_URL",
                "-e",
                "VOICEVOX_SPEAKER_ID",
                "your-local-docker-image-name"
            ],
            "env": {
                "PULSE_SERVER": "unix:/mnt/wslg/PulseServer",
                "SDL_AUDIODRIVER": "pulseaudio",
                "VOICEVOX_API_URL": "http://host.docker.internal:50031",
                "VOICEVOX_SPEAKER_ID": "919692871"
            }
        }
    }
}

Speaker IDs

The default speaker ID is 1 (corresponding to "四国めたん"). To use a different speaker, modify the VOICEVOX_SPEAKER_ID environment variable. You can retrieve a list of available speakers using the VOICEVOX ENGINE API:

curl http://localhost:50021/speakers

Troubleshooting

  • VOICEVOX Connection Errors: Ensure the VOICEVOX ENGINE is running and the API URL is correctly configured.
  • No Audio Output: Verify that VLC is installed and accessible via PATH.
  • Docker Audio Issues: Check your pulseaudio settings.

Developer Information

Contributions are welcome! Please create an issue or submit a pull request for any bugs or feature requests.

License

This project is licensed under the MIT License.

Features & Capabilities

Categories
mcp_server model_context_protocol voicevox voice_synthesis typescript docker ai_agents claude

Implementation Details

Stats

0 Views
2 GitHub Stars

Repository Info

Dosugamea Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300