Skip to main content

基于第三方柏拉图api的sunoai插件,支持文生音乐和纯音乐

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-sunoai

✨ 基于第三方柏拉图api的sunoai插件,支持文生音乐和纯音乐 ✨

license pypi python

📖 介绍

这是使用第三方拉图api的sunoai插件,你需要先去柏拉图api注册一个账号,创建一个key放到env配置里suno_key = "sk-xxxxxxxxx",然后账户里充点钱,因为使用是一毛钱一首,然后就可以使用了

💿 安装

使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-sunoai
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install nonebot-plugin-sunoai
pdm
pdm add nonebot-plugin-sunoai
poetry
poetry add nonebot-plugin-sunoai
conda
conda install nonebot-plugin-sunoai

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot_plugin_sunoai"]

⚙️ 配置

在 nonebot2 项目的.env文件中添加下表中的必填配置

配置项 必填 默认值 说明
suno_key 柏拉图api创建的key

🎉 使用

指令表

发送 suno -h 获取帮助

使用指令 'suno -p 我要炸学校'生成简易模式歌曲 或 'suno -n 炸学校(标题) -t pop,edm(风格) -l 我去炸学校,天天不迟到(歌词) '来生成自定义歌曲,如果是纯音乐请不要加-l和歌词,要加个-i

可用的选项有:

使用简单模式 Prompt(使用后无需其他参数)

-p│--prompt <prompt: str+> 歌曲的标题

--name│-n <name: str+> 歌曲的tag,逗号分隔

--tag│-t <tag: str+> 歌词(支持更高级的语法)

--lyrics│-l <lyrics: str+> 纯音乐模式

-i│--instrumental

使用示例:

suno -p 我要炸学校

suno -n 炸学校 -t pop,edm -l 我去炸学校,天天不迟到

效果图

c3be587b67a2dcb58e54d98731060b9

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_sunoai-0.1.0.tar.gz (17.4 kB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_sunoai-0.1.0-py3-none-any.whl (18.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page