nonebot-plugin-audiocraft


Namenonebot-plugin-audiocraft JSON
Version 0.0.5 PyPI version JSON
download
home_page
SummaryA nonebot plugin for facebook's audiocraft
upload_time2023-06-19 10:57:19
maintainer
docs_urlNone
authorAlpaca
requires_python>=3.8,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <a href="https://v2.nonebot.dev/store"><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
  <br>
  <p><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg" width="240" alt="NoneBotPluginText"></p>
</div>

<div align="center">

# nonebot-plugin-audiocraft
</div>

# 介绍
- 本插件适配[Facebook开源的AI作曲模型](https://github.com/facebookresearch/audiocraft/),在nonebot框架下调用已经部署好的模型后端服务器API进行AI作曲
- 本插件需要配合部署好的audiocraft进行使用

# 安装

* 手动安装
  ```
  git clone https://github.com/Alpaca4610/nonebot_plugin_audiocraft.git
  ```

  下载完成后在bot项目的pyproject.toml文件手动添加插件:

  ```
  plugin_dirs = ["xxxxxx","xxxxxx",......,"下载完成的插件路径/nonebot-plugin-audiocraft"]
  ```
* 使用 pip
  ```
  pip install nonebot-plugin-audiocraft
  ```
# 后端服务器部署
参考[官方仓库](https://github.com/facebookresearch/audiocraft#usage)部署好gradio后端,获得后端网址。(colab上部署的可以开启gradio的外链分享)


# 使用方法

- 由于最近tx风控严重,go-cqhttp面临重启后可能掉账号的风险,所以插件使用给机器人发送消息配置后端服务器配置的方法。
- 每次重启机器人后,使用 %%后端服务器地址 绑定audiocraft后端服务器。
- 绑定后端服务器后,使用 AI作曲+乐曲的英文描述 即可触发AI作曲。
- AI作曲的参数(如模型、时长)等通过代码进行修改,代码中有注释说明。

# 效果

![Alt](demo1.png)
![Alt](demo2.png)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "nonebot-plugin-audiocraft",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Alpaca",
    "author_email": "alpaca@bupt.edu.cn",
    "download_url": "https://files.pythonhosted.org/packages/1f/38/dcba9732534dcc7aae5d2d3ffcbefc01cba16aaa9f3b9dbb83891d2d58c4/nonebot_plugin_audiocraft-0.0.5.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <a href=\"https://v2.nonebot.dev/store\"><img src=\"https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png\" width=\"180\" height=\"180\" alt=\"NoneBotPluginLogo\"></a>\n  <br>\n  <p><img src=\"https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg\" width=\"240\" alt=\"NoneBotPluginText\"></p>\n</div>\n\n<div align=\"center\">\n\n# nonebot-plugin-audiocraft\n</div>\n\n# \u4ecb\u7ecd\n- \u672c\u63d2\u4ef6\u9002\u914d[Facebook\u5f00\u6e90\u7684AI\u4f5c\u66f2\u6a21\u578b](https://github.com/facebookresearch/audiocraft/)\uff0c\u5728nonebot\u6846\u67b6\u4e0b\u8c03\u7528\u5df2\u7ecf\u90e8\u7f72\u597d\u7684\u6a21\u578b\u540e\u7aef\u670d\u52a1\u5668API\u8fdb\u884cAI\u4f5c\u66f2\n- \u672c\u63d2\u4ef6\u9700\u8981\u914d\u5408\u90e8\u7f72\u597d\u7684audiocraft\u8fdb\u884c\u4f7f\u7528\n\n# \u5b89\u88c5\n\n* \u624b\u52a8\u5b89\u88c5\n  ```\n  git clone https://github.com/Alpaca4610/nonebot_plugin_audiocraft.git\n  ```\n\n  \u4e0b\u8f7d\u5b8c\u6210\u540e\u5728bot\u9879\u76ee\u7684pyproject.toml\u6587\u4ef6\u624b\u52a8\u6dfb\u52a0\u63d2\u4ef6\uff1a\n\n  ```\n  plugin_dirs = [\"xxxxxx\",\"xxxxxx\",......,\"\u4e0b\u8f7d\u5b8c\u6210\u7684\u63d2\u4ef6\u8def\u5f84/nonebot-plugin-audiocraft\"]\n  ```\n* \u4f7f\u7528 pip\n  ```\n  pip install nonebot-plugin-audiocraft\n  ```\n# \u540e\u7aef\u670d\u52a1\u5668\u90e8\u7f72\n\u53c2\u8003[\u5b98\u65b9\u4ed3\u5e93](https://github.com/facebookresearch/audiocraft#usage)\u90e8\u7f72\u597dgradio\u540e\u7aef\uff0c\u83b7\u5f97\u540e\u7aef\u7f51\u5740\u3002\uff08colab\u4e0a\u90e8\u7f72\u7684\u53ef\u4ee5\u5f00\u542fgradio\u7684\u5916\u94fe\u5206\u4eab\uff09\n\n\n# \u4f7f\u7528\u65b9\u6cd5\n\n- \u7531\u4e8e\u6700\u8fd1tx\u98ce\u63a7\u4e25\u91cd\uff0cgo-cqhttp\u9762\u4e34\u91cd\u542f\u540e\u53ef\u80fd\u6389\u8d26\u53f7\u7684\u98ce\u9669\uff0c\u6240\u4ee5\u63d2\u4ef6\u4f7f\u7528\u7ed9\u673a\u5668\u4eba\u53d1\u9001\u6d88\u606f\u914d\u7f6e\u540e\u7aef\u670d\u52a1\u5668\u914d\u7f6e\u7684\u65b9\u6cd5\u3002\n- \u6bcf\u6b21\u91cd\u542f\u673a\u5668\u4eba\u540e\uff0c\u4f7f\u7528 %%\u540e\u7aef\u670d\u52a1\u5668\u5730\u5740 \u7ed1\u5b9aaudiocraft\u540e\u7aef\u670d\u52a1\u5668\u3002\n- \u7ed1\u5b9a\u540e\u7aef\u670d\u52a1\u5668\u540e\uff0c\u4f7f\u7528 AI\u4f5c\u66f2+\u4e50\u66f2\u7684\u82f1\u6587\u63cf\u8ff0 \u5373\u53ef\u89e6\u53d1AI\u4f5c\u66f2\u3002\n- AI\u4f5c\u66f2\u7684\u53c2\u6570\uff08\u5982\u6a21\u578b\u3001\u65f6\u957f\uff09\u7b49\u901a\u8fc7\u4ee3\u7801\u8fdb\u884c\u4fee\u6539\uff0c\u4ee3\u7801\u4e2d\u6709\u6ce8\u91ca\u8bf4\u660e\u3002\n\n# \u6548\u679c\n\n![Alt](demo1.png)\n![Alt](demo2.png)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A nonebot plugin for facebook's audiocraft",
    "version": "0.0.5",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "343024d71d628d1001a02b00e35b957a6153463cfa65a9d632ee1ddcc85c664b",
                "md5": "1d0ac1df7262a2bd79a9055fdf8e08ec",
                "sha256": "009ee5b2dfbf2af43a62b6dbae70b4bbf68d6fd4e026a2f84e50bef8f5aa7cc0"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_audiocraft-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1d0ac1df7262a2bd79a9055fdf8e08ec",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 3445,
            "upload_time": "2023-06-19T10:57:18",
            "upload_time_iso_8601": "2023-06-19T10:57:18.415643Z",
            "url": "https://files.pythonhosted.org/packages/34/30/24d71d628d1001a02b00e35b957a6153463cfa65a9d632ee1ddcc85c664b/nonebot_plugin_audiocraft-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f38dcba9732534dcc7aae5d2d3ffcbefc01cba16aaa9f3b9dbb83891d2d58c4",
                "md5": "bfc5d720e371601c9594001052fce9bf",
                "sha256": "c786b20dc427d8c523dd5bec9ad3968c3074b9393d2a714a74b7b907437ceb3b"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_audiocraft-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "bfc5d720e371601c9594001052fce9bf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 3275,
            "upload_time": "2023-06-19T10:57:19",
            "upload_time_iso_8601": "2023-06-19T10:57:19.853057Z",
            "url": "https://files.pythonhosted.org/packages/1f/38/dcba9732534dcc7aae5d2d3ffcbefc01cba16aaa9f3b9dbb83891d2d58c4/nonebot_plugin_audiocraft-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-19 10:57:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "nonebot-plugin-audiocraft"
}
        
Elapsed time: 0.14417s