{"id":15669591,"url":"https://github.com/cssxsh/mirai-tts-plugin","last_synced_at":"2025-10-09T02:41:08.988Z","repository":{"id":53268711,"uuid":"340495448","full_name":"cssxsh/mirai-tts-plugin","owner":"cssxsh","description":"Mirai Console 语音生成前置插件","archived":false,"fork":false,"pushed_at":"2023-06-22T08:01:15.000Z","size":173,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-06T20:12:54.174Z","etag":null,"topics":["mirai","mirai-console"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cssxsh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-19T21:37:55.000Z","updated_at":"2024-02-28T01:56:27.000Z","dependencies_parsed_at":"2024-10-23T10:06:19.884Z","dependency_job_id":"5a823b6c-9971-4f72-b89a-bd0ea60b8fd4","html_url":"https://github.com/cssxsh/mirai-tts-plugin","commit_stats":{"total_commits":35,"total_committers":2,"mean_commits":17.5,"dds":0.02857142857142858,"last_synced_commit":"36ac7ef2e0909f079b1f62e987dfc0ba206a9523"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":"project-mirai/mirai-console-plugin-template","purl":"pkg:github/cssxsh/mirai-tts-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fmirai-tts-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fmirai-tts-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fmirai-tts-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fmirai-tts-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cssxsh","download_url":"https://codeload.github.com/cssxsh/mirai-tts-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fmirai-tts-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000775,"owners_count":26082906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mirai","mirai-console"],"created_at":"2024-10-03T14:40:25.688Z","updated_at":"2025-10-09T02:41:08.972Z","avatar_url":"https://github.com/cssxsh.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Mirai TTS Plugin](https://github.com/cssxsh/mirai-tts-plugin)\n\n\u003e Mirai TTS 前置插件\n\nMirai-Console的前置插件，用于将文本转换成语音等  \n\n[![maven-central](https://img.shields.io/maven-central/v/xyz.cssxsh.mirai/mirai-tts-plugin)](https://search.maven.org/artifact/xyz.cssxsh.mirai/mirai-tts-plugin)\n[![Build](https://github.com/cssxsh/mirai-tts-plugin/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/cssxsh/mirai-tts-plugin/actions/workflows/build.yml)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/c10823fade1b4a6580ffb08a777c75f0)](https://www.codacy.com/gh/cssxsh/mirai-tts-plugin/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=cssxsh/mirai-tts-plugin\u0026amp;utm_campaign=Badge_Grade)\n\n本插件使用的TTS API 返回的是 mp3 格式的语音，非手机端接收到语音可能播放不正常,  \n你可以安装 [Mirai Silk Converter](https://github.com/project-mirai/mirai-silk-converter) 进行自动转码，解决mp3格式的问题。  \n没有配置 AIP APP 信息时，将使用百度百科的接口，此接口只支持部分 `person` 。  \n如需要更多的功能选择，请到 [baidu aip](https://ai.baidu.com/ai-doc/SPEECH/qknh9i8ed#%E6%88%90%E4%B8%BA%E5%BC%80%E5%8F%91%E8%80%85)  申请新应用和免费额度。\n\n本插件不提供下载 `Vits` 模型的支持！！！也不接受如何下载或训练的询问！！！\n\n## 在插件项目中引用\n\n`build.gradle.kt` 示例\n```kotlin\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    compileOnly(\"xyz.cssxsh.mirai:mirai-tts-plugin:${version}\")\n}\n\nmirai {\n    jvmTarget = JavaVersion.VERSION_11\n}\n```\n\n## TTS指令\n\n*   `/tts test \u003cperson\u003e \u003cspeed\u003e \u003cpitch\u003e \u003cvolume\u003e` 测试 tts\n    ```log\n    /tts test 4100 5 5 5\n    你好 世界\n    ```\n\n*   `/tts reload` 重载 aip 配置\n\n## VITS指令\n\n*   `/vits moe \u003cmodel\u003e \u003cspeaker\u003e`\n    ```log\n    /vits moe arknights 阿米娅\n    [JA] はあなたが大好きです [JA]\n    ```\n    \n*   `/vits reload` 重载 Vits 配置\n\n## 配置\n\n### [TextToSpeech.yml](src/main/kotlin/xyz/cssxsh/mirai/tts/data/TextToSpeechConfig.kt)\n\nAIP 应用配置信息 可以在 [百度云控制台](https://console.bce.baidu.com/ai/?fromai=1#/ai/speech/app/list) 找到\n\n*   `app_name` AIP 配置 应用名称\n\n*   `app_id` AIP 配置 AppID\n\n*   `api_key` AIP 配置 API Key\n\n*   `secret_key` AIP 配置 Secret Key\n\n*   `option` Speech 配置\n    *   `speed` 语速 0~15\n    *   `pitch` 语调 0~15\n    *   `volume` 音量 0~15\n    *   `person` 音库 详见 [demo](example/demo.json), 百度百科的接口只支持 `0, 1, 3, 106, 4100, 4106`\n    *   `format` 格式\n\n### [Vits.yml](src/main/kotlin/xyz/cssxsh/mirai/tts/data/VitsConfig.kt)\n\nVits 配置信息, 其中 [MoeGoe](https://github.com/CjangCjengh/MoeGoe/releases/latest) 请自行下载并解压\n\n*  `moegoe` MoeGoe 启动路径，你需要修改为你自己的目录\n\n模型请放置于 `data\\xyz.cssxsh.mirai.plugin.mirai-tts-plugin\\vits` 下  \n例如：\n```log\ndata\n└───xyz.cssxsh.mirai.plugin.mirai-tts-plugin\n    └───vits\n        ├───arknights\n        │   ├───G_latest.pth\n        |   └───moegoe_config.json\n        └───genshin\n            ├───G_latest.pth\n            └───moegoe_config.json\n```\n\n### 示例代码\n\n*   [kotlin](src/main/kotlin/xyz/cssxsh/mirai/tts/command/TextToSpeechCommand.kt)\n*   [java](src/test/java/xyz/cssxsh/mirai/test/MiraiTTSDemo.java)\n\n## 安装\n\n### MCL 指令安装\n\n**请确认 mcl.jar 的版本是 2.1.0+**  \n`./mcl --update-package xyz.cssxsh.mirai:mirai-tts-plugin --channel maven-stable --type plugins`\n\n### 手动安装\n\n1.  从 [Releases](https://github.com/cssxsh/mirai-tts-plugin/releases) 或者 [Maven](https://repo1.maven.org/maven2/xyz/cssxsh/mirai/mirai-tts-plugin/) 下载 `mirai2.jar`\n2.  将其放入 `plugins` 文件夹中\n\n## [爱发电](https://afdian.net/@cssxsh)\n\n![afdian](.github/afdian.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssxsh%2Fmirai-tts-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcssxsh%2Fmirai-tts-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssxsh%2Fmirai-tts-plugin/lists"}