Metadata-Version: 2.1
Name: nonebot-plugin-tts-gal
Version: 0.2.1
Summary: 
Home-page: https://github.com/dpm12345/nonebot_plugin_tts_gal
License: MIT
Author: dpm12345
Author-email: 1006975692@qq.com
Requires-Python: >=3.7.3,<4.0.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Dist: ffmpy (>=0.3.0,<0.4.0)
Requires-Dist: jamo (>=0.4.1,<0.5.0)
Requires-Dist: nonebot-adapter-onebot (>=2.1.1,<3.0.0)
Requires-Dist: nonebot2 (>=2.0.0b4,<3.0.0)
Requires-Dist: numba (>=0.56.0,<0.57.0)
Requires-Dist: numpy (>=1.20.0,<2.0.0)
Requires-Dist: pyopenjtalk (>=0.3.0,<0.4.0)
Requires-Dist: scipy (>=1.5.2,<2.0.0)
Requires-Dist: torch (>=1.6.0,<2.0.0)
Requires-Dist: unidecode (>=1.1.1,<2.0.0)
Project-URL: Repository, https://github.com/dpm12345/nonebot_plugin_tts_gal
Description-Content-Type: text/markdown


<p align="center">
  <a href="https://v2.nonebot.dev/"><img src="https://v2.nonebot.dev/logo.png" width="200" height="200" alt="nonebot"></a>
</p>

<div align="center">

# nonebot_plugin_tts_gal

基于nonebot和vits的部分gal角色的语音合成插件

</div>



# 前言

本人python比较菜，因此可能有些地方写的比较屎，还望轻喷

# 安装

pip安装

```
pip install nonebot_plugin_tts_gal
```

nb-cli安装

```
nb plugin install nonebot-plugin-tts-gal
```



## 资源文件

下载`data`文件夹，并放入在bot的运行目录下



## 相关依赖

ffmpeg的安装

#### Windows

在ffmpeg官网下载[ffmpeg下载](https://github.com/BtbN/FFmpeg-Builds/releases),选择对应的版本，下载后解压，并将位于`bin`目录添加到环境变量中

其他具体细节可自行搜索

#### Linux

Ubuntu下

```
apt-get install ffmpeg
```

或者下载源码安装(具体可搜索相关教程)

# 配置项

请在使用的配置文件(.env.*)加入

```
auto_delete_voice = True
```

用于是否自动删除生成的语音文件，如不想删除，可改为

```
auto_delete_voice = False
```



# 使用

群聊和私聊仅有细微差别，其中下面语句中，`name`为合成语音的角色，`text`为转语音的文本内容(会自动转为日文，故也可以输入中文等其他语言)

## 群聊

`@机器人 [name]说[text]`

## 私聊

`[name]说[text]`



目前`name`有

- 宁宁|绫地宁宁
- 因幡爱瑠|爱瑠
- 朝武芳乃|芳乃
- 常陸茉子|茉子
- 丛雨|幼刀
- 鞍馬小春|鞍马小春|小春
- 在原七海|七海
- ATRI|atri|亚托莉

其他自定义添加模型可以到我的github主页查看[nonebot_plugin_tts_gal](https://github.com/dpm12345/nonebot_plugin_tts_gal)

# 今后

添加更多的模型



# 感谢

+ 部分代码参考自[nonebot-plugin-petpet](https://github.com/noneplugin/nonebot-plugin-petpet)

+ **[CjangCjengh](https://github.com/CjangCjengh/)**：g2p转换，适用于日语调形标注的符号文件及分享的[柚子社多人模型](https://github.com/CjangCjengh/TTSModels)
+ **[luoyily](https://github.com/luoyily)**：分享的[ATRI模型](https://pan.baidu.com/s/1_vhOx50OE5R4bE02ZMe9GA?pwd=9jo4)

# 更新日志
**2022.9.21**:修改依赖
**2022.9.25**:优化修改代码逻辑，支持自行添加vits模型，简单修复了一下有道翻译的翻译问题，启动时自动检测所需文件是否缺失

