cortico-world-voice 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +35 -9
  3. package/THIRD_PARTY_NOTICES.md +5 -0
  4. package/assets/music-abc/GeneralUser-GS-LICENSE.txt +47 -0
  5. package/assets/music-abc/manifest.json +11 -0
  6. package/assets/music-abc/upstream-commit.txt +1 -0
  7. package/describe.json +244 -42
  8. package/dist/webui.js +250 -9
  9. package/dist/webui.js.map +4 -4
  10. package/licenses/music-abc/Apache-2.0.txt +202 -0
  11. package/licenses/music-abc/THIRD_PARTY.md +25 -0
  12. package/licenses/music-abc/abcjs-MIT.txt +21 -0
  13. package/licenses/music-abc/extension-MIT.txt +21 -0
  14. package/licenses/music-abc/fflate-MIT.txt +21 -0
  15. package/licenses/music-abc/sprintf-BSD-3-Clause.txt +26 -0
  16. package/licenses/music-abc/stb-vorbis-C.txt +39 -0
  17. package/package.json +9 -5
  18. package/python/music_separate.py +75 -0
  19. package/src/cloud.ts +3 -1
  20. package/src/config.ts +5 -1
  21. package/src/definition.ts +10 -22
  22. package/src/download.ts +2 -3
  23. package/src/ffmpeg.ts +9 -5
  24. package/src/firered.ts +15 -1
  25. package/src/install.ts +4 -1
  26. package/src/jobs.ts +6 -0
  27. package/src/music-abc/ENV_PROMPT.md +1 -0
  28. package/src/music-abc/abc.js +74 -0
  29. package/src/music-abc/audio-worker.js +41 -0
  30. package/src/music-abc/audio.js +39 -0
  31. package/src/music-abc/config.js +15 -0
  32. package/src/music-abc/index.js +11 -0
  33. package/src/music-abc/instruments.js +23 -0
  34. package/src/music-abc/open-folder.js +14 -0
  35. package/src/music-abc/soundfont-info.js +12 -0
  36. package/src/music-abc/soundfonts.js +145 -0
  37. package/src/music-abc/store.js +82 -0
  38. package/src/music-abc/tool-text.js +132 -0
  39. package/src/music-abc/warnings.js +3 -0
  40. package/src/music-abc/world.d.ts +26 -0
  41. package/src/music-abc/world.js +210 -0
  42. package/src/music-command.ts +46 -0
  43. package/src/music-demucs.ts +197 -0
  44. package/src/music-process.ts +151 -0
  45. package/src/project-env.ts +55 -11
  46. package/src/proxy.ts +45 -17
  47. package/src/rvc-long.ts +131 -0
  48. package/src/tool-text.ts +39 -12
  49. package/src/uv.ts +9 -5
  50. package/src/wav.ts +40 -7
  51. package/src/webui/abc/panels.d.ts +3 -0
  52. package/src/webui/abc/panels.js +356 -0
  53. package/src/webui/abc/score-follow.js +40 -0
  54. package/src/webui/abc/score-title.js +5 -0
  55. package/src/webui/abc/style.js +27 -0
  56. package/src/webui/abc/tool-text-panel.js +128 -0
  57. package/src/webui/client.ts +77 -29
  58. package/src/webui/listen.ts +6 -2
  59. package/src/webui/music.ts +282 -0
  60. package/src/webui/tools.ts +66 -16
  61. package/src/world.ts +314 -46
package/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## 0.1.2
2
+
3
+ - 新增「音乐」页,下设「分离」「混音」「ABC」「记录」:Demucs ONNX 人声/伴奏分离(有 NVIDIA 显卡时默认走 CUDA,执行器起不来时回退 CPU)、多轨音量与延迟混音、从 ABC 音乐扩展迁入的乐谱编辑、试听、作品与音源管理,以及汇总分离与混音成品的「记录」页。
4
+ - 新增 `audio_separate`、`audio_mix`,迁入 `audio_abc_music_score`、`audio_abc_music_play`、`audio_abc_music_control`;音乐事件使用 `audio.separated`、`audio.mixed`、`audio.abc_played`。
5
+ - 变声长音频自动分段:超过 90 秒按 90 秒一片、相邻 2 秒重叠送 RVC,转换后交叉淡化拼回原时长,不再需要手动切片。
6
+ - 依赖页给本扩展装过的项目加了「卸载」按钮,确认后停掉占用文件的子进程并删除部署目录里的源码、环境、权重或模型;系统里已有的 uv / ffmpeg、用户导入的音色与声库、已生成的音频都不动。
7
+ - 「工具」页为每个工具增加模型可见性开关,按部署保存;`audio_listen` 默认关闭,用户可自行开启,恢复默认后再次关闭。关闭项从工具表移除,保存后提示重载系统前缀。
8
+ - 修复依赖安装:uv 的工作目录不存在时不再误报「uv 没装」;HTTP 超时放宽到 60 秒;失败信息去掉 ANSI 与进度残片,并按源保留完整输出;识别环境按实际依赖自检,不再统一 import `sherpa_onnx`。
9
+ - 收紧扩展自身的网络与下载:不再改写宿主进程的代理环境变量,代理只按请求用于本扩展的请求;uv 固定 0.13.6、ffmpeg 固定 BtbN 构建,下载后校验大小与 SHA-256 再解压执行。
10
+
11
+ ## 0.1.1
12
+
13
+ - 事件统一按 `external` 投递;说话、转写、变声和唱歌的后台失败事件统一为 `audio.failed`。
14
+ - 删除挂载时的 `audio.started` 事件及其声明。
15
+
1
16
  ## 0.1.0
2
17
 
3
18
  - 首个版本:把「听、转写、说话、唱歌、变声、播放」收进一个 World,取代原来的 tts / stt / listen / audio-play 四个扩展。
package/README.md CHANGED
@@ -3,14 +3,18 @@
3
3
  Owner: `src/definition.ts`
4
4
 
5
5
  声音整合包:一个 World 承载「听、转写、说话、唱歌、变声、播放」,避免 World 之间互相调 HTTP。
6
- 当前进度:骨架 + 依赖管理 + 播放 + 本机识别 + 监听(采集 / VAD / 切块 / 自动转写)+ 变声(RVC)+ 唱歌(DiffSinger)。
6
+ 当前进度:依赖管理、播放、本机识别、监听、变声(RVC)、唱歌(DiffSinger),以及音乐的分离、混音与 ABC 创作。
7
7
  能力接入一个就在 `AudioWorld.capabilities()` 里点亮一项。
8
8
 
9
9
  | 文件 | 内容 |
10
10
  |---|---|
11
11
  | `src/definition.ts` | `WorldDefinition`:id、label、默认配置段、`create()`、`describe` |
12
12
  | `src/config.ts` | 配置段类型、默认值与配置键声明(面板写回时按它验收) |
13
- | `src/world.ts` | `World` 实现:挂载事件、`audio_status`、依赖页的 `invoke` 与状态快照 |
13
+ | `src/world.ts` | `World` 实现:生命周期、`audio_status`、依赖页的 `invoke` 与状态快照 |
14
+ | `src/music-process.ts` | 分离/混音任务、历史与输出文件 |
15
+ | `src/music-demucs.ts` | Demucs ONNX 源码、环境、权重三个阶段的获取与续装 |
16
+ | `src/music-abc/` | 从 ABC 音乐扩展迁入的曲谱、音源与 WAV 渲染实现 |
17
+ | `src/webui/music.ts` | 「音乐」与分离、混音、ABC 二级页 |
14
18
  | `src/gpu.ts` | `nvidia-smi` 检测、解析与选档(≥ 4 GB 走显卡档) |
15
19
  | `src/uv.ts` | uv 识别(配置 → PATH → 常见位置 → 自己装的那份)与安装 |
16
20
  | `src/ffmpeg.ts` | ffmpeg 识别与安装 |
@@ -44,7 +48,7 @@ Owner: `src/definition.ts`
44
48
  | `src/import-legacy.ts` | 旧 stt / tts / listen 三个 World 的记录一次性并进来 |
45
49
  | `src/wav.ts` | 从 WAV 头算时长(认不出就回 null) |
46
50
  | `src/webui/records.ts` | 「记录」页:转写 / 语音两栏 |
47
- | `src/webui/client.ts` | 「依赖」「说话」「听」「工具」四页的面板入口(播放与记录收在二级页签) |
51
+ | `src/webui/client.ts` | 「依赖」「说话」「听」「音乐」「工具」的面板入口(播放与记录收在二级页签) |
48
52
  | `src/ENV_PROMPT.md` | 环境提示词模板;默认留空,写清用法后再补 |
49
53
  | `tests/` | 干装载、事件、状态工具、显卡解析、权重缺失、依赖页挂载 |
50
54
 
@@ -55,12 +59,25 @@ Owner: `src/definition.ts`
55
59
 
56
60
  ## 工具
57
61
 
58
- - `audio_say`:按当前引擎合成并排队播放;`silent` 不播放,合成完以 `audio.say_done` 事件带回:正文里有本地路径,同时挂一份音频附件(Core 分配的 `log:` 句柄)。失败都走 `audio.say_failed`。
59
- - `audio_transcribe`:后台转写音频文件(本机 SenseVoice 或云端引擎),文字进「记录 → 转写」并以 `audio.transcribed` 事件带回;失败走 `audio.transcribe_failed`。
62
+ - `audio_say`:按当前引擎合成并排队播放;`silent` 不播放,合成完以 `audio.say_done` 事件带回:正文里有本地路径,同时挂一份音频附件(Core 分配的 `log:` 句柄)。失败走 `audio.failed`。
63
+ - `audio_transcribe`:后台转写音频文件(本机 SenseVoice 或云端引擎),文字进「记录 → 转写」并以 `audio.transcribed` 事件带回;失败走 `audio.failed`。
60
64
  - `audio_listen`:开始 / 停止 / 查看监听;状态里带每路的电平、块数与最近听到的几句。
61
- - `audio_convert`:把一段音频换成当前变声音色;立刻回执,成功进语音记录并自动播放;`silent` 不播放,完成以 `audio.convert_done` 带回路径与音频附件句柄。失败推 `audio.convert_failed`。
62
- - `audio_sing`:把歌词唱出来(DiffSinger);立刻回执,成功进语音记录并自动播放;`silent` 不播放,完成以 `audio.sing_done` 带回路径与音频附件句柄。失败推 `audio.sing_failed`。
65
+ - `audio_convert`:把一段音频换成当前变声音色;立刻回执,成功进语音记录并自动播放;`silent` 不播放,完成以 `audio.convert_done` 带回路径与音频附件句柄。失败走 `audio.failed`。
66
+ - `audio_sing`:把歌词唱出来(DiffSinger);立刻回执,成功进语音记录并自动播放;`silent` 不播放,完成以 `audio.sing_done` 带回路径与音频附件句柄。失败走 `audio.failed`。
63
67
  - `audio_play` / `audio_queue` / `audio_status`:播放队列与状态。播放、变声、转写都接受本地路径或 Core 的 `log:`/`mem:` 附件句柄。
68
+ - `audio_separate`:后台把歌曲分成人声与伴奏,完成以 `audio.separated` 带回两个路径。
69
+ - `audio_mix`:按每轨音量(0–200%)与延迟(秒)混合 1–16 条本地音轨,完成以 `audio.mixed` 带回 WAV 路径。
70
+ - `audio_abc_music_score` / `audio_abc_music_play` / `audio_abc_music_control`:沿用 ABC 音乐扩展的工具;事件交付改用 `audio.abc_played`,来源为 `external`。
71
+
72
+ 说话、转写、变声、唱歌、分离和混音的后台失败统一推送 `audio.failed`,正文保留工具名、任务编号与失败原因。
73
+
74
+ ## 音乐
75
+
76
+ - **分离**:在「依赖」页的「Demucs 分离」行获取,分离页也保留同一任务的快捷入口。按「源码 → 环境 → 权重」顺序获取:校验并解压 `demucs-onnx` 0.3.4 源码、建立独立 Python 环境、下载 htdemucs ONNX 权重(约 166 MB)。检测到 NVIDIA 显卡时装 `onnxruntime-gpu`(把 CUDA 13 与 cuDNN 9 运行库一起放进环境,首次约 1.5 GB),分离默认走显卡;驱动或运行库不齐时自动退回 CPU,任务详情里会显示实际执行器。没有显卡时只装 CPU 版,两种档位都不需要 torch 或 torchaudio。各阶段独立显示状态,重试跳过已完成阶段;输出人声与伴奏 WAV,支持取消、试听、复制路径和加入混音。源码、环境和权重分别保存在 `runtimes/audio/demucs-onnx/source/0.3.4`、`runtimes/audio/demucs-onnx/.venv`、`models/audio/demucs-onnx`;旧版 PyTorch 的目录另行保留。
77
+ - **混音**:需要 ffmpeg,可从本机文件、分离结果或 ABC 作品添加音轨,设置各轨音量与开始时间,生成立体声 WAV。最长一轨结束后收尾,并限制峰值避免削波;任务在后台执行,可取消。
78
+ - **ABC**:完整迁入 `cortico-world-music-abc` 的乐谱编辑、五线谱预览、试听、WAV/MIDI/ABC 作品与 SF2/SF3 音源管理。默认不附带采样音源;可在「乐器」获取 GeneralUser GS 或导入本机音源,保留原有许可提示。作品可以加入混音。
79
+
80
+ 数据存放在 `<dataDir>/audio/music/`:分离与混音各自保存任务与输出,ABC 数据在 `abc/`。ABC 设置在 `worlds.audio.music.abc`,工具说明沿用声音扩展的统一「工具」页。原独立 ABC 扩展的数据目录与配置保留。
64
81
 
65
82
  合成、变声与唱歌的成品落在 `<dataDir>/audio/out/`,转写记录在 `<dataDir>/audio/transcripts/`,
66
83
  转写与语音各自是「目录 + index.json」,面板的「记录」页读它们。听到的声音不再存音频文件,只把正文写进转写记录。
@@ -110,8 +127,15 @@ SenseVoice 的情感与音频事件(笑声、掌声、背景音乐等)跟正
110
127
 
111
128
  ## 「工具」页
112
129
 
113
- 每个工具的描述与参数说明都能在页面上改;保存到 `<部署>/worlds/audio/tool-text.json`,
114
- 下次会话构建工具表时生效。可筛选、按条恢复默认、整份恢复。
130
+ 每个工具都有「向模型开放」开关,`audio_listen` 默认关闭,其余默认开放;用户可自行开启。
131
+ 已有明确保存的开关覆盖会继续保留。关闭后,该工具会从模型工具表中移除;
132
+ 工具表更新后,模型即使记得工具名,再调用也由 Cortico 按不存在的工具处理。
133
+ 开关与描述、参数说明一起保存到 `<部署>/worlds/audio/tool-text.json`,仅影响当前部署。
134
+ 保存后点框架显示的「前缀待重载」更新当前会话;新会话或重启时也会读取这些设置。
135
+ 可筛选、按条恢复默认文字、整份恢复(`audio_listen` 回到关闭,其余回到开放)。
136
+
137
+ 这里控制模型能调用哪些工具;关闭 `audio_listen` 不会停止已开启的声音采集,也不会关闭「通知 Coo」。
138
+ 要停用采集与通知,请到「听」页操作。市场的「读取隐私」是包级标注,不随本机工具开关自动改变。
115
139
 
116
140
  ## 「依赖」页
117
141
 
@@ -127,6 +151,8 @@ SenseVoice 的情感与音频事件(笑声、掌声、背景音乐等)跟正
127
151
  - **VAD / 细分**:Silero VAD、FireRed VAD 流式 ONNX + FireRed AED(`models/audio/vad/`,FireRed 两个模型共约 4.7 MB,共用 `cmvn.ark`)。
128
152
  - **语音识别**:整段用 SenseVoiceSmall int8(`models/audio/stt/sensevoice/`);
129
153
  流式用 Paraformer 中英流式模型(`models/audio/stt/paraformer/`,约 226 MB,sherpa-onnx OnlineRecognizer)。
154
+ - **卸载**:本扩展装过的行会多一个「卸载」按钮,确认后先停掉占用文件的子进程,再删本扩展写进部署目录的东西;
155
+ 系统里已有的 uv / ffmpeg、用户导入的音色与声库、已生成的音频记录都不动。安装任务进行中不能卸载。
130
156
 
131
157
  ## 约定
132
158
 
@@ -9,3 +9,8 @@
9
9
  - Model files downloaded by the 依赖 page keep their upstream licenses:
10
10
  GPT-SoVITS (MIT), RVC assets (MIT), DiffSinger 绮萱声库 (see its bundled terms),
11
11
  Silero VAD (MIT), FireRedVAD (see upstream), sherpa-onnx SenseVoice/Moonshine exports.
12
+ # 音乐
13
+
14
+ - `src/music-abc/` 与 `src/webui/abc/` 迁自 [cortico-world-music-abc](https://github.com/AqualCross/cortico-world-music-abc),MIT,Copyright (c) 2026 AqualCross。原许可与依赖许可在 `licenses/music-abc/`,详细来源见其中的 `THIRD_PARTY.md`。
15
+ - ABC 使用 abcjs 6.7.2(MIT)与 spessasynth_core 4.3.22(Apache-2.0);浏览器产物保留 abcjs 与其内嵌 sprintf 的完整声明。GeneralUser GS 不随包附带,仅在用户点击获取后下载;元数据和原许可在 `assets/music-abc/`。
16
+ - 分离使用 [demucs-onnx 0.3.4](https://github.com/StemSplit/demucs-onnx)(MIT)与 [StemSplitio/htdemucs-onnx](https://huggingface.co/StemSplitio/htdemucs-onnx) 的 MIT 权重,原始模型来自 [Demucs](https://github.com/facebookresearch/demucs)(MIT)。源码包及模型下载固定版本并校验 SHA-256,源码包自带上游许可。独立 Python 推理环境使用 ONNX Runtime、NumPy、SoundFile 等默认依赖,不安装 PyTorch 或导出依赖;源码、环境与权重在用户点击获取后另行下载,不随 npm 包附带。混音和分离的音频解码使用本机 FFmpeg。
@@ -0,0 +1,47 @@
1
+ *** GeneralUser GS v2.0.3 ***
2
+ *** License v2.0 ***
3
+
4
+ ** License of the complete work **
5
+ You may use GeneralUser GS without restriction for your own music creation,
6
+ private or commercial. This SoundFont bank is provided to the community free of
7
+ charge. Please feel free to use it in your software projects, and to modify the
8
+ SoundFont bank or its packaging to suit your needs.
9
+
10
+ ** License of contained samples **
11
+ GeneralUser GS inherits the usage rights of the samples contained within, all of
12
+ which allow full use in music production, including the ability to make profit
13
+ from musical recordings created with GeneralUser GS.
14
+
15
+ Many of the samples are original, but some were taken from other banks freely
16
+ (and legally) available on the Internet from various SoundFont websites. Because
17
+ GeneralUser GS originated as a personal project with no intention for
18
+ publication, I cannot be 100% sure where all of the samples originated, although
19
+ I do know that none of them came from commercially published SoundFont packages
20
+ or sample CDs. Regardless, many "free" SoundFonts available on the web may
21
+ indeed contain samples of questionable origin. My understanding of the
22
+ copyrights of all samples is only as good as the information provided by the
23
+ original sources. If you become aware of any restricted samples being used in
24
+ GeneralUser GS, please let me know so I can replace them.
25
+
26
+ This uncertainty may concern you if you intend to use GeneralUser GS in a
27
+ commercial software product. That being said, I have never received any
28
+ complaint regarding sample ownership since I published the original GeneralUser
29
+ GS back in 2000, and as far as I am aware, neither have any of the companies
30
+ creating commercial software products using GeneralUser GS.
31
+
32
+ ** More info **
33
+ If you plan to feature GeneralUser GS on your own website, please do not link
34
+ directly to my download files. Either link to my website, or provide your own
35
+ local copy instead.
36
+
37
+ I hope you enjoy GeneralUser GS! This SoundFont bank is the product of many
38
+ years of hard work.
39
+
40
+ You can find updates to GeneralUser GS and more of my virtual instruments at:
41
+ http://www.schristiancollins.com
42
+
43
+ I can be reached via the contact page on my website here:
44
+ https://www.schristiancollins.com/contact
45
+
46
+ Thank you!
47
+ -~Chris
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "GeneralUser GS",
3
+ "version": "2.0.3",
4
+ "author": "S. Christian Collins",
5
+ "source": "https://github.com/mrbumpy409/GeneralUser-GS",
6
+ "commit": "684543d5e5efaef08d02be50dcda8d552478fa60",
7
+ "file": "GeneralUser-GS.sf2",
8
+ "bytes": 32319396,
9
+ "sha256": "9575028c7a1f589f5770fccc8cff2734566af40cd26ed836944e9a5152688cfe",
10
+ "license": "GeneralUser-GS-LICENSE.txt"
11
+ }
@@ -0,0 +1 @@
1
+ 684543d5e5efaef08d02be50dcda8d552478fa60
package/describe.json CHANGED
@@ -27,15 +27,15 @@
27
27
  "type": "string",
28
28
  "description": "Absolute path to the audio file; give this or handle."
29
29
  },
30
+ "handle": {
31
+ "type": "string",
32
+ "description": "A log:/mem: blob handle for the audio; give this or path."
33
+ },
30
34
  "volume": {
31
35
  "type": "number",
32
36
  "minimum": 0,
33
37
  "maximum": 100,
34
38
  "description": "Volume for this item; defaults to the configured volume."
35
- },
36
- "handle": {
37
- "type": "string",
38
- "description": "A log:/mem: blob handle for the audio; give this or path."
39
39
  }
40
40
  }
41
41
  },
@@ -49,7 +49,7 @@
49
49
  },
50
50
  {
51
51
  "name": "audio_say",
52
- "description": "Say a line with the configured speech engine and play it through the audio queue. Returns at once: synthesis and playback run in the background, and only a failure comes back as an audio.say_failed event. With silent=true it synthesizes in the background without playback and the file path comes back as an audio.say_done event.",
52
+ "description": "Say a line with the configured speech engine and play it through the audio queue. Returns at once: synthesis and playback run in the background, and only a failure comes back as an audio.failed event. With silent=true it synthesizes in the background without playback and the file path comes back as an audio.say_done event.",
53
53
  "parameters": {
54
54
  "type": "object",
55
55
  "additionalProperties": false,
@@ -82,23 +82,23 @@
82
82
  },
83
83
  {
84
84
  "name": "audio_convert",
85
- "description": "Convert an audio file (a local path, or a log:/mem: blob handle) into the configured RVC voice and play the result through the audio queue. Returns at once: conversion runs in the background, the result lands in the speech records, and only a failure comes back as an audio.convert_failed event.",
85
+ "description": "Convert an audio file (a local path, or a log:/mem: blob handle) into the configured RVC voice and play the result through the audio queue. Returns at once: conversion runs in the background, the result lands in the speech records, and only a failure comes back as an audio.failed event.",
86
86
  "parameters": {
87
87
  "type": "object",
88
88
  "additionalProperties": false,
89
89
  "properties": {
90
90
  "path": {
91
91
  "type": "string",
92
- "description": "Absolute path to the audio file; give this or handle."
93
- },
94
- "voice": {
95
- "type": "string",
96
- "description": "Optional voice file name (the .pth in the voice folder); empty uses the configured one."
92
+ "description": "Absolute path to the audio file to convert; give this or handle."
97
93
  },
98
94
  "handle": {
99
95
  "type": "string",
100
96
  "description": "A log:/mem: blob handle for the audio; give this or path."
101
97
  },
98
+ "voice": {
99
+ "type": "string",
100
+ "description": "Optional voice file name (the .pth in the voice folder); empty uses the configured one."
101
+ },
102
102
  "silent": {
103
103
  "type": "boolean",
104
104
  "description": "Convert only; do not play. The path and an audio blob handle come back as an audio.convert_done event."
@@ -115,7 +115,7 @@
115
115
  },
116
116
  {
117
117
  "name": "audio_sing",
118
- "description": "Sing the given lyrics with the configured DiffSinger voicebank and play the song through the audio queue. Returns at once: synthesis runs in the background, the result lands in the speech records, and only a failure comes back as an audio.sing_failed event.",
118
+ "description": "Sing the given lyrics with the configured DiffSinger voicebank and play the song through the audio queue. Returns at once: synthesis runs in the background, the result lands in the speech records, and only a failure comes back as an audio.failed event.",
119
119
  "parameters": {
120
120
  "type": "object",
121
121
  "additionalProperties": false,
@@ -144,7 +144,7 @@
144
144
  },
145
145
  {
146
146
  "name": "audio_transcribe",
147
- "description": "Transcribe an audio file (a local path, or a log:/mem: blob handle) with the configured speech-to-text engine. Returns at once: transcription runs in the background, the text lands in the transcript records and comes back as an audio.transcribed event; a failure comes back as audio.transcribe_failed.",
147
+ "description": "Transcribe an audio file (a local path, or a log:/mem: blob handle) with the configured speech-to-text engine. Returns at once: transcription runs in the background, the text lands in the transcript records and comes back as an audio.transcribed event; a failure comes back as audio.failed.",
148
148
  "parameters": {
149
149
  "type": "object",
150
150
  "additionalProperties": false,
@@ -169,7 +169,7 @@
169
169
  },
170
170
  {
171
171
  "name": "audio_listen",
172
- "description": "Start, stop or inspect hearing: system audio, the microphone, or one application. Lanes split audio by voice activity and transcribe each chunk, or — when a lane is set to streaming — transcribe live and cut sentences by the engine endpoints. Transcribed sentences land in the transcript records (no audio files are kept). With delivery set to notify, each audio.heard is pushed with trigger=debounce, so the core batches close sentences into one wake-up (window and batch limits come from the framework batching settings).",
172
+ "description": "Start, stop or inspect hearing: system audio, the microphone, or one application. Lanes split audio by voice activity and transcribe each chunk, or — when a lane is set to streaming — transcribe live and cut sentences by the engine endpoints. Transcribed sentences land in the transcript records (no audio files are kept). With the delivery setting on notify, each audio.heard is pushed with trigger=debounce, so the core batches close sentences into one wake-up (window and batch limits come from the framework batching settings).",
173
173
  "parameters": {
174
174
  "type": "object",
175
175
  "additionalProperties": false,
@@ -233,42 +233,222 @@
233
233
  "zh": "查看或改动播放队列。",
234
234
  "en": "Inspect or change the playback queue."
235
235
  }
236
- }
237
- ],
238
- "events": [
236
+ },
239
237
  {
240
- "type": "audio.started",
241
- "description": {
242
- "zh": "声音 World 已挂载。",
243
- "en": "The audio World was mounted."
238
+ "name": "audio_separate",
239
+ "description": "Separate a local song into vocals and accompaniment with the installed Demucs model. Returns a job id immediately; completion arrives as audio.separated with both file paths, failure as audio.failed. Setup is obtained by the user in Music > Separate.",
240
+ "parameters": {
241
+ "type": "object",
242
+ "additionalProperties": false,
243
+ "properties": {
244
+ "path": {
245
+ "type": "string",
246
+ "description": "Local audio file to separate."
247
+ }
248
+ },
249
+ "required": [
250
+ "path"
251
+ ]
252
+ },
253
+ "tags": [
254
+ "act"
255
+ ],
256
+ "summary": {
257
+ "zh": "把歌曲分成人声和伴奏。",
258
+ "en": "Separate a song into vocals and accompaniment."
244
259
  }
245
260
  },
246
261
  {
247
- "type": "audio.heard",
248
- "description": {
249
- "zh": "从某一路声音里切出一块并(可自动)转成文字,正文存进转写记录;事件默认只归档,打开「通知 Coo」时按内核 debounce 投递,几句会在同一次唤醒里一起给到模型。",
250
- "en": "A chunk was cut from one listening lane and transcribed (when enabled); the text goes to the transcript records. Archived by default; with notify on the event is pushed with trigger=debounce, so the core batches close sentences into one wake-up."
262
+ "name": "audio_mix",
263
+ "description": "Mix 1–16 local audio tracks into a WAV with per-track volume and start delay. Returns a job id immediately; completion arrives as audio.mixed with the file path, failure as audio.failed. Does not play automatically.",
264
+ "parameters": {
265
+ "type": "object",
266
+ "additionalProperties": false,
267
+ "properties": {
268
+ "tracks": {
269
+ "type": "array",
270
+ "minItems": 1,
271
+ "maxItems": 16,
272
+ "items": {
273
+ "type": "object",
274
+ "additionalProperties": false,
275
+ "properties": {
276
+ "path": {
277
+ "type": "string"
278
+ },
279
+ "volume": {
280
+ "type": "number",
281
+ "minimum": 0,
282
+ "maximum": 200,
283
+ "description": "Volume percent; default 100."
284
+ },
285
+ "delaySec": {
286
+ "type": "number",
287
+ "minimum": 0,
288
+ "maximum": 3600,
289
+ "description": "Start delay in seconds; default 0."
290
+ }
291
+ },
292
+ "required": [
293
+ "path"
294
+ ]
295
+ }
296
+ }
297
+ },
298
+ "required": [
299
+ "tracks"
300
+ ]
301
+ },
302
+ "tags": [
303
+ "act"
304
+ ],
305
+ "summary": {
306
+ "zh": "按音量和时间偏移混合多条音轨。",
307
+ "en": "Mix tracks with individual levels and start offsets."
251
308
  }
252
309
  },
253
310
  {
254
- "type": "audio.say_failed",
255
- "description": {
256
- "zh": "后台合成一句话失败了;成功不打扰。",
257
- "en": "A background audio_say synthesis failed; successes stay silent."
311
+ "name": "audio_abc_music_score",
312
+ "description": "Validate, save or read ABC scores. Saved scores appear as sheet music in the Scores panel. Before editing, get the current score and save with expectedRevision. Audio rendering is separate. Validation and saving work without installed SoundFonts.",
313
+ "parameters": {
314
+ "type": "object",
315
+ "additionalProperties": false,
316
+ "properties": {
317
+ "action": {
318
+ "type": "string",
319
+ "enum": [
320
+ "check",
321
+ "save",
322
+ "get",
323
+ "list"
324
+ ]
325
+ },
326
+ "abc": {
327
+ "type": "string",
328
+ "maxLength": 48000,
329
+ "description": "One complete ABC tune with X/M/L/K headers; T/Q recommended. Use V: for independent voices and [CEG] for chords. Quoted chord names are labels and do not create accompaniment."
330
+ },
331
+ "id": {
332
+ "type": "string"
333
+ },
334
+ "expectedRevision": {
335
+ "type": "string"
336
+ },
337
+ "title": {
338
+ "type": "string",
339
+ "maxLength": 160
340
+ },
341
+ "instrument": {
342
+ "type": "string",
343
+ "description": "Preset ID from audio_abc_music_control action=instruments. Selects the SoundFont and default MIDI patch. Explicit ABC %%MIDI program overrides individual voices within that SoundFont."
344
+ }
345
+ },
346
+ "required": [
347
+ "action"
348
+ ]
349
+ },
350
+ "tags": [
351
+ "act"
352
+ ],
353
+ "summary": {
354
+ "zh": "检查、保存与读取 ABC 曲谱和版本。",
355
+ "en": "Validate, save and read ABC scores."
258
356
  }
259
357
  },
260
358
  {
261
- "type": "audio.convert_failed",
262
- "description": {
263
- "zh": "后台变声失败了;成功不打扰。",
264
- "en": "A background audio_convert conversion failed; successes stay silent."
359
+ "name": "audio_abc_music_play",
360
+ "description": "Render a WAV in the background using an installed SoundFont. Supply exactly one of score or abc. Direct ABC is saved after rendering succeeds. Works retain the ABC snapshot and MIDI. return attaches audio to the tool receipt; event emits audio.abc_played. Playback and sending use other tools. Ask the user to obtain or import a SoundFont in Instruments when none is installed.",
361
+ "parameters": {
362
+ "type": "object",
363
+ "additionalProperties": false,
364
+ "properties": {
365
+ "score": {
366
+ "type": "string",
367
+ "description": "Saved score ID."
368
+ },
369
+ "abc": {
370
+ "type": "string",
371
+ "maxLength": 48000,
372
+ "description": "One complete ABC tune with X/M/L/K headers; T/Q recommended. Use V: for independent voices and [CEG] for chords. Quoted chord names are labels and do not create accompaniment."
373
+ },
374
+ "title": {
375
+ "type": "string",
376
+ "maxLength": 160
377
+ },
378
+ "instrument": {
379
+ "type": "string",
380
+ "description": "Preset ID from audio_abc_music_control action=instruments. Selects the SoundFont and default MIDI patch. Explicit ABC %%MIDI program overrides individual voices within that SoundFont."
381
+ },
382
+ "delivery": {
383
+ "type": "string",
384
+ "enum": [
385
+ "return",
386
+ "event"
387
+ ]
388
+ }
389
+ }
390
+ },
391
+ "tags": [
392
+ "act"
393
+ ],
394
+ "summary": {
395
+ "zh": "把 ABC 曲谱渲染为采样音源 WAV,并保存作品。",
396
+ "en": "Render ABC to sampled audio and retain a score snapshot."
265
397
  }
266
398
  },
267
399
  {
268
- "type": "audio.sing_failed",
400
+ "name": "audio_abc_music_control",
401
+ "description": "Read ABC Music status, list installed SoundFont presets, or set the default instrument and audio delivery. Use instruments before choosing a preset ID. SoundFonts are obtained or imported by the user in the Instruments panel.",
402
+ "parameters": {
403
+ "type": "object",
404
+ "additionalProperties": false,
405
+ "properties": {
406
+ "action": {
407
+ "type": "string",
408
+ "enum": [
409
+ "status",
410
+ "instruments",
411
+ "set"
412
+ ]
413
+ },
414
+ "instrument": {
415
+ "type": "string",
416
+ "description": "Preset ID from audio_abc_music_control action=instruments. Selects the SoundFont and default MIDI patch. Explicit ABC %%MIDI program overrides individual voices within that SoundFont."
417
+ },
418
+ "delivery": {
419
+ "type": "string",
420
+ "enum": [
421
+ "return",
422
+ "event"
423
+ ]
424
+ },
425
+ "eventDelivery": {
426
+ "type": "string",
427
+ "enum": [
428
+ "archive",
429
+ "model"
430
+ ]
431
+ }
432
+ },
433
+ "required": [
434
+ "action"
435
+ ]
436
+ },
437
+ "tags": [
438
+ "act"
439
+ ],
440
+ "summary": {
441
+ "zh": "列出音源预设、查看状态或设置乐器与交付方式。",
442
+ "en": "List SoundFont presets, read status or configure instruments and delivery."
443
+ }
444
+ }
445
+ ],
446
+ "events": [
447
+ {
448
+ "type": "audio.heard",
269
449
  "description": {
270
- "zh": "后台唱歌失败了;成功不打扰。",
271
- "en": "A background audio_sing synthesis failed; successes stay silent."
450
+ "zh": "从某一路声音里切出一块并(可自动)转成文字,正文存进转写记录;事件默认只归档,打开「通知 Coo」时按内核 debounce 投递,几句会在同一次唤醒里一起给到模型。",
451
+ "en": "A chunk was cut from one listening lane and transcribed (when enabled); the text goes to the transcript records. Archived by default; with notify on the event is pushed with trigger=debounce, so the core batches close sentences into one wake-up."
272
452
  }
273
453
  },
274
454
  {
@@ -279,17 +459,17 @@
279
459
  }
280
460
  },
281
461
  {
282
- "type": "audio.transcribed",
462
+ "type": "audio.failed",
283
463
  "description": {
284
- "zh": "后台转写完成,带回文字。",
285
- "en": "A background transcription finished; it carries the text."
464
+ "zh": "后台说话、转写、变声、唱歌、分离或混音失败,正文包含工具名、任务编号与失败原因。",
465
+ "en": "A background speech, transcription, conversion, singing, separation, or mixing task failed; the text includes the tool name, job id, and error."
286
466
  }
287
467
  },
288
468
  {
289
- "type": "audio.transcribe_failed",
469
+ "type": "audio.transcribed",
290
470
  "description": {
291
- "zh": "后台转写失败。",
292
- "en": "A background transcription failed."
471
+ "zh": "后台转写完成,带回文字。",
472
+ "en": "A background transcription finished; it carries the text."
293
473
  }
294
474
  },
295
475
  {
@@ -305,6 +485,28 @@
305
485
  "zh": "silent 唱歌完成,带回本地路径与音频附件句柄。",
306
486
  "en": "A silent audio_sing finished; it carries the local path and the audio as a blob attachment."
307
487
  }
488
+ },
489
+ {
490
+ "type": "audio.separated",
491
+ "description": {
492
+ "zh": "歌曲分离完成,带回人声与伴奏路径。",
493
+ "en": "Song separation finished with paths to vocals and accompaniment."
494
+ }
495
+ },
496
+ {
497
+ "type": "audio.mixed",
498
+ "description": {
499
+ "zh": "混音完成,带回 WAV 路径。",
500
+ "en": "Mixing finished with the WAV file path."
501
+ }
502
+ },
503
+ {
504
+ "type": "audio.abc_played",
505
+ "description": {
506
+ "zh": "ABC 演奏完成:WAV 附件、曲谱版本与文件路径。",
507
+ "en": "ABC rendering completed, with a WAV attachment and score revision."
508
+ },
509
+ "trigger": "debounce"
308
510
  }
309
511
  ],
310
512
  "prompts": [