PolarHub
  • Agents
  • MCP Servers
  • Skills
  • PolarBear
PolarHub © 2026
MCP Serverstext-to-speechryoooo
返回「text-to-speech」

ryoooo

modelscope·@ryoooo/nijivoice-mcp

text-to-speech0下载LocalModelScope

简介

暂无描述。

MCP Server 详情

来自 ModelScope 索引

NijiVoice-MCP

⚠️ Notice: This project is under development and has not been fully tested. It is not recommended for use in a production environment. ⚠️

NijiVoice-MCP is an implementation of the Model Context Protocol (MCP) for the Nijivoice API. It enables access to the Nijivoice API from LLMs (Large Language Models), making it easy to perform text-to-speech synthesis.

Overview of Features

  • Text-to-speech synthesis using the Nijivoice API
  • Retrieval of available voice actors
  • Checking credit balance
  • Integration with LLMs through the MCP interface

Prerequisites

  • Python 3.12 or higher
  • Nijivoice API key
  • Internet connection

Installation

bash

Clone the repository

git clone https://github.com/YOUR_USERNAME/nijivoice-mcp.git cd nijivoice-mcp

Install dependencies

pip install -e .

Environment Setup

  1. Create a .env file and add the following content:

NIJIVOICE_API_KEY=Your API Key DEFAULT_VOICE_ACTOR_ID=Default Voice Actor ID (optional) LOG_LEVEL=INFO

  1. You can obtain the API key from the official Nijivoice website.

Usage

Starting the MCP Server

bash python main.py

This will start the MCP server, ready to accept requests from LLM clients.

Example of Speech Synthesis

Call the tools from an LLM client that utilizes the MCP server as follows:

python

Retrieve available voice actors

actors = await tools.call("actor/get_voice_actors")

Generate speech

voice_result = await tools.call("voice/generate_voice", { "script": "こんにちは、にじボイスのテストです。", "voice_actor_id": "90031163-c497-44f3-a8a6-e45e4d0cb8f6", # Voice Actor ID "speed": 1.0, "emotional_level": 0.5, "sound_duration": 0.1, "format": "mp3" })

Check credit balance

balance = await tools.call("credit/get_credit_balance")

Available MCP Tools

Voice Actor Related

  • actor/get_voice_actors(): Retrieves a list of available voice actors

Voice Generation

  • voice/generate_voice(script, voice_actor_id, speed, emotional_level, sound_duration, format): Generates a URL for the audio file
  • voice/generate_encoded_voice(script, voice_actor_id, speed, emotional_level, sound_duration, format): Generates Base64 encoded audio data

Credit Management

  • credit/get_credit_balance(): Retrieves the credit balance

Support for Special Tags

The following special tags can be used within scripts:

  • <sp 1.0>xxx</sp>: Changes the speed of the text within the tag
  • <wait 0.3>: Inserts a pause for the specified number of seconds

Information for Developers

Project Structure

nijivoice-mcp/ ├── config.py # Configuration file ├── debug_api.py # Script for API debugging ├── lib/ # Libraries ├── logger.py # Logging configuration ├── main.py # Main entry point ├── mcp/ # MCP implementation │ ├── init.py # MCP server initialization │ ├── actors.py # Voice actor related tools │ ├── credits.py # Credit related tools │ ├── prompts.py # Prompt definitions │ └── voice.py # Voice generation tools ├── nijivoice/ # Nijivoice API client │ ├── init.py │ ├── api.py # API client implementation │ ├── exceptions.py # Exception definitions │ └── models.py # Data models ├── pyproject.toml # Project definition ├── server.py # Server implementation └── utils/ # Utilities ├── init.py ├── audio.py # Audio processing utilities ├── error_handling.py # Error handling └── retry.py # Retry logic### Test

bash

Run the test

pytest

Limitations and Known Issues

⚠️ Important Limitations:

  1. This project is under development, and features or specifications may change.
  2. Changes in the Nijivoice API specifications may cause it to stop working.
  3. There are parts where error handling is not sufficient.
  4. Timeouts may occur during the generation of long voice clips.
  5. It may not be compatible with some API response structures.

Troubleshooting

If you encounter any issues:

  1. Check the log file nijivoice_mcp.log.
  2. Ensure that the API key is correctly set.
  3. Verify your internet connection.
  4. Check the status of the Nijivoice API.

License

This project is provided under the MIT License.

Acknowledgments

This project uses FastMCP and Model Context Protocol. It utilizes the voice synthesis technology of Nijivoice.


“Voiced by NIJI Voice”

相关 MCP Servers(来自「text-to-speech」)

devizor

暂无描述。

@devizor/macOS-Notification-MCP

pinkpixel-dev

暂无描述。

@pinkpixel-dev/blabber-mcp

mcp-openai

暂无描述。

@NimbleBrainInc/mcp-openai

venice-mcp

暂无描述。

@georgeglarson/venice-mcp

MatthewDailey

暂无描述。

@MatthewDailey/rime-mcp

微软Edge文本转语音MCP服务器

一个模型上下文协议服务器,为使用微软Edge文本转语音技术的AI代理提供文本转语音功能,支持多种声音、语言和语音定制。

@yuiseki/edge_tts_mcp_server

自动安装

点击按钮会唤起 PolarBear 客户端,并把当前 MCP Server 的 Markdown 详情文档地址传给客户端。

/api/mcps/ryoooo-nijivoice-mcp/markdown
打开 PolarBear 安装查看 Markdown 文档

手动安装

在 PolarBear 或其他支持 MCP 的客户端中,新建 MCP Server,并参考下方来源或安装提示配置。

暂未识别到安装命令,请打开 ModelScope 详情查看完整配置。

基本信息

分类
text-to-speech / speech-processing
运行方式
No
许可证
MIT License
详情文件
ryoooo-nijivoice-mcp.md