npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@onedeepai/voice_generator

v1.0.0

Published

一个语音生成MCP服务器

Readme

语音生成MCP服务器 (@onedeepai/voice_generator)

这是一个基于阿里云DashScope的语音生成MCP (Model Context Protocol) 服务器,提供文本转语音功能。

特性

  • 基于阿里云DashScope的文字转语音服务
  • 支持男声和女声切换
  • 简单易用的MCP接口
  • 生成的语音文件保存到本地

安装

全局安装:

npm install -g @onedeepai/voice_generator

作为项目依赖安装:

npm install --save @onedeepai/voice_generator

前置条件

您需要先获取阿里云DashScope的API密钥。可以通过以下方式设置密钥:

  1. 设置环境变量:
export DASHSCOPE_API_KEY="您的API密钥"
  1. 或在调用时提供密钥参数

使用方法

作为MCP服务器运行

# 使用npx运行
npx -y @onedeepai/voice_generator

# 或者如果已全局安装
@onedeepai/voice_generator

与MCP Inspector一起使用

启动服务器后,可以用MCP Inspector进行测试:

npx @modelcontextprotocol/inspector

API参数

gen_voice

| 参数 | 类型 | 必需 | 描述 | |---------|------|------|------| | text | string | 是 | 要转换为语音的文本 | | voice_type | string | 否 | 音色类型: "female"/"1"(女声,默认) 或 "male"/"2"(男声) | | api_key | string | 否 | DashScope API密钥,如不提供则使用环境变量 |

示例

{
  "name": "gen_voice",
  "params": {
    "text": "你好,这是一段测试文本。",
    "voice_type": "female"
  }
}

使用注意事项

  • 生成的音频文件会保存在output目录下
  • 每次生成的文件会使用随机UUID作为文件名
  • 使用前请确保您的阿里云DashScope API密钥有效
  • 该服务使用阿里云的cosyvoice-v2模型生成语音

许可证

MIT