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

koishi-plugin-vits-edge-tts

v0.1.1

Published

基于 Microsoft Edge TTS 的 Koishi VITS 语音合成服务

Readme

koishi-plugin-vits-edge-tts

npm

基于 Microsoft Edge TTS 的 Koishi VITS 语音合成服务插件。

功能特性

  • 🎙️ 丰富的语音角色:支持 300+ 种语音角色
  • 🌍 多语言支持:支持中文、英文、日文、韩文、法语、德语、西班牙语等多种语言
  • 云端服务:基于魔搭社区的 Edge TTS 服务,无需本地部署
  • 🎛️ 灵活调节:支持语速和音调调节
  • 🔌 标准接口:实现 Koishi VITS 服务接口,可与其他插件无缝集成

使用方法

基础用法

使用 edge-tts 命令(或别名 vitssay)生成语音:

edge-tts 你好,世界
vits Hello, World!
say こんにちは

命令参数

  • --spkr <角色名>:指定语音角色
  • --rate <数值>:调节语速,范围 -100 到 100(负数减速,正数加速)
  • --pitch <数值>:调节音调,范围 -100 到 100(负数降调,正数升调)

使用示例

# 使用默认角色
edge-tts 你好

# 指定中文男声
edge-tts --spkr "zh-CN-YunxiNeural - Male" 你好

# 调节语速(加快20%)
edge-tts --rate 20 你好

# 调节音调(降低10)
edge-tts --pitch -10 你好

# 组合使用
edge-tts --spkr "en-US-JennyNeural - Female" --rate 10 --pitch -5 Hello, how are you?

配置选项

在 Koishi 控制台的插件配置页面,你可以设置:

  • 默认语音角色:从 300+ 个语音中选择默认使用的角色
  • 语速调节:设置默认语速(-100 到 100)
  • 音调调节:设置默认音调(-100 到 100)

支持的语音角色

中文语音

  • 普通话

    • zh-CN-XiaoxiaoNeural - Female(晓晓,女声,默认)
    • zh-CN-XiaoyiNeural - Female(晓伊,女声)
    • zh-CN-YunjianNeural - Male(云健,男声)
    • zh-CN-YunxiNeural - Male(云希,男声)
    • zh-CN-YunxiaNeural - Male(云霞,男声)
    • zh-CN-YunyangNeural - Male(云扬,男声)
    • zh-CN-liaoning-XiaobeiNeural - Female(晓北,辽宁口音)
    • zh-CN-shaanxi-XiaoniNeural - Female(晓妮,陕西口音)
  • 粤语

    • zh-HK-HiuGaaiNeural - Female
    • zh-HK-HiuMaanNeural - Female
    • zh-HK-WanLungNeural - Male
  • 台湾国语

    • zh-TW-HsiaoChenNeural - Female
    • zh-TW-HsiaoYuNeural - Female
    • zh-TW-YunJheNeural - Male

英文语音

  • 美式英语

    • en-US-AriaNeural - Female
    • en-US-JennyNeural - Female
    • en-US-GuyNeural - Male
    • en-US-AndrewNeural - Male
    • 等多种美式英语语音
  • 英式英语

    • en-GB-SoniaNeural - Female
    • en-GB-RyanNeural - Male
    • 等多种英式英语语音

其他语言

支持日语、韩语、法语、德语、西班牙语、阿拉伯语、俄语、葡萄牙语等 50+ 种语言的语音合成。

完整的语音列表请查看 data/speaker.json 文件。

作为 VITS 服务使用

本插件实现了 Koishi 的 VITS 服务接口,可以被其他插件调用:

// 在其他插件中使用
export class MyPlugin extends Service {
  static inject = ['vits']
  
  async generateVoice() {
    const audio = await this.ctx.vits.say({
      input: '你好,世界',
      speaker_id: 0  // 使用第一个语音角色
    })
    return audio
  }
}

技术说明

注意事项

  1. 本插件依赖于魔搭社区的在线服务,需要网络连接
  2. 服务可用性取决于魔搭社区的服务状态
  3. 每次语音生成都会创建新的连接,适合按需使用的场景
  4. 生成的语音为临时 URL,建议及时使用

许可证

MIT License

相关链接