Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added mcp_central/ace_music_gen/.DS_Store
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除

Binary file not shown.
1 change: 1 addition & 0 deletions mcp_central/ace_music_gen/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
67 changes: 67 additions & 0 deletions mcp_central/ace_music_gen/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# ACE Music Generator

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

迁移进examples文件夹

基于ACE-Step的音乐生成工具包

## 安装

首先安装ACE-Step库

```bash
git clone https://github.com/ACE-Studio/ACE-Step.git
cd ACE-Step
pip install -r requirements.txt
pip install -e .
```

然后安装本项目

```bash
cd ace_music_gen
uv sync
```

## 使用

运行程序

```bash
uv run python main.py
```

或者在代码中使用

```python
from src.ace_music_gen import SimpleACEMusicGen

generator = SimpleACEMusicGen()
generator.setup_api("your_api_key")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

README.md的“使用”部分,API密钥的占位符是 your_api_key,但在“配置”部分(第57行)的示例中是 your_dashscope_api_key。为了保持文档的一致性,建议统一使用 your_dashscope_api_key,因为它更具体地指明了这是哪种API密钥。

Suggested change
generator.setup_api("your_api_key")
generator.setup_api("your_dashscope_api_key")

result = generator.generate_and_create_music("生成一首轻快的歌")
```

## 项目结构

```
ace_music_gen/
├── src/ace_music_gen/
│ ├── generator.py # 音乐生成
│ ├── evaluator.py # 音频评估
│ └── llm_client.py # LLM客户端
└── main.py # 运行入口
```

## 配置

可以设置阿里云API密钥来生成更好的歌词

```python
generator.setup_api("your_dashscope_api_key")
```

## 依赖

- librosa
- numpy
- requests
- pesq

生成的音频文件保存在outputs目录下
Loading