Skip to content

Commit 583c301

Browse files
committed
Initial release: SCRIBE DiffSinger annotation tool
Tauri v2 + React + Rust with native INT8-mix quantized inference for F0 extraction (RMVPE/FCPE) and MIDI estimation (SOME).
0 parents  commit 583c301

117 files changed

Lines changed: 36289 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: Build & Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- os: windows-latest
19+
label: windows
20+
bundle: nsis
21+
artifact-glob: 'src-tauri/target/release/bundle/nsis/*.exe'
22+
features: ''
23+
- os: windows-latest
24+
label: windows-asio
25+
bundle: nsis
26+
artifact-glob: 'src-tauri/target/release/bundle/nsis/*.exe'
27+
features: 'asio'
28+
- os: macos-latest
29+
label: macos
30+
bundle: dmg
31+
artifact-glob: 'src-tauri/target/release/bundle/dmg/*.dmg'
32+
features: ''
33+
34+
runs-on: ${{ matrix.os }}
35+
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- uses: actions/setup-node@v4
40+
with:
41+
node-version: 20
42+
cache: 'npm'
43+
44+
- uses: dtolnay/rust-toolchain@stable
45+
46+
- uses: Swatinem/rust-cache@v2
47+
with:
48+
workspaces: src-tauri
49+
key: ${{ matrix.label }}
50+
51+
- name: Install LLVM (Windows)
52+
if: runner.os == 'Windows'
53+
uses: KyleMayes/install-llvm-action@v2
54+
with:
55+
version: '17'
56+
57+
- name: Setup ASIO SDK
58+
if: matrix.features == 'asio'
59+
shell: bash
60+
env:
61+
ASIO_SDK_BASE64: ${{ secrets.ASIO_SDK_BASE64 }}
62+
run: |
63+
echo "$ASIO_SDK_BASE64" | base64 -d > asio_sdk.zip
64+
mkdir -p asio_sdk
65+
7z x asio_sdk.zip -oasio_sdk -y
66+
echo "CPAL_ASIO_DIR=$PWD/asio_sdk/ASIOSDK" >> $GITHUB_ENV
67+
68+
- name: Install npm dependencies
69+
run: npm ci
70+
71+
- name: Build Tauri app
72+
if: matrix.features == ''
73+
run: npx tauri build --bundles ${{ matrix.bundle }}
74+
75+
- name: Build Tauri app (ASIO)
76+
if: matrix.features == 'asio'
77+
shell: bash
78+
run: npx tauri build --bundles ${{ matrix.bundle }} -- --features asio
79+
80+
- name: Rename ASIO installer
81+
if: matrix.features == 'asio'
82+
shell: bash
83+
run: |
84+
for f in src-tauri/target/release/bundle/nsis/*-setup.exe; do
85+
mv "$f" "${f%-setup.exe}-asio-setup.exe"
86+
done
87+
88+
- name: Upload installer artifact
89+
uses: actions/upload-artifact@v4
90+
with:
91+
name: scribe-${{ matrix.label }}
92+
path: ${{ matrix.artifact-glob }}
93+
if-no-files-found: error
94+
95+
release:
96+
needs: build
97+
runs-on: ubuntu-latest
98+
if: startsWith(github.ref, 'refs/tags/v')
99+
100+
steps:
101+
- name: Download all artifacts
102+
uses: actions/download-artifact@v4
103+
with:
104+
path: artifacts
105+
merge-multiple: true
106+
107+
- name: Create GitHub Release
108+
uses: softprops/action-gh-release@v2
109+
with:
110+
draft: true
111+
generate_release_notes: true
112+
files: artifacts/*

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build output
5+
dist/
6+
7+
# Rust / Tauri build
8+
src-tauri/target/
9+
10+
# ASIO SDK (cannot be redistributed)
11+
asio_sdk/
12+
ASIO-SDK_*.zip
13+
14+
# LLVM installer
15+
LLVM-*.exe
16+
17+
# Python bytecode
18+
__pycache__/
19+
*.pyc
20+
21+
# OS files
22+
.DS_Store
23+
Thumbs.db
24+
25+
# Environment
26+
.env
27+
.env.local
28+
29+
# Model weights (download separately)
30+
*.scr
31+
32+
# IDE / editor
33+
.vscode/
34+
.idea/

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# SCRIBE
2+
3+
DiffSinger 数据标注工具 — 用于歌声合成变量参数数据集的制作与标注。
4+
5+
## 功能
6+
7+
- F0(基频)提取:Parselmouth / RMVPE / FCPE,全部 Rust 原生推理(INT8-mix 量化)
8+
- MIDI 估算:SOME 模型,Rust 原生推理
9+
- 音素时长标注与编辑
10+
- 实时音频播放与波形显示
11+
- 钢琴卷帘编辑器
12+
- 导入/导出 DiffSinger 格式
13+
14+
## 构建
15+
16+
### 环境要求
17+
18+
- Node.js >= 18
19+
- Rust >= 1.75
20+
- [Tauri v2 CLI](https://v2.tauri.app/start/prerequisites/)
21+
22+
### 模型文件
23+
24+
构建前需将以下模型文件放入 `src-tauri/`
25+
26+
| 文件 | 模型 | 用途 |
27+
|------|------|------|
28+
| `rmvpe.scr` | RMVPE (INT8-mix) | F0 提取 |
29+
| `fcpe.scr` | FCPE (INT8-mix) | F0 提取 |
30+
| `some.scr` | SOME (INT8-mix) | MIDI 估算 |
31+
32+
模型通过 Python 导出脚本从 PyTorch checkpoint 量化生成(脚本未包含在此仓库中)。
33+
34+
### 开发
35+
36+
```bash
37+
npm install
38+
cargo tauri dev
39+
```
40+
41+
### 构建发布版本
42+
43+
```bash
44+
cargo tauri build
45+
```
46+
47+
输出安装包在 `src-tauri/target/release/bundle/`
48+
49+
## ASIO 支持(可选)
50+
51+
如需 ASIO 低延迟音频输出:
52+
53+
1. 下载 [Steinberg ASIO SDK](https://www.steinberg.net/asiosdk)
54+
2. 解压到项目根目录 `asio_sdk/`
55+
3. 构建时启用 feature:`cargo tauri build -- --features asio`
56+
57+
## 技术栈
58+
59+
- **前端**:React + TypeScript + Vite
60+
- **后端**:Rust + Tauri v2
61+
- **音频**:cpal (跨平台音频 I/O)
62+
- **推理引擎**:自研 INT8-mix 量化推理,AVX2 SIMD 加速
63+
64+
## License
65+
66+
MIT

index.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!doctype html>
2+
<html lang="zh-CN">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>SCRIBE</title>
7+
<style>
8+
* { margin: 0; padding: 0; box-sizing: border-box; }
9+
html, body, #root { width: 100%; height: 100%; overflow: hidden; }
10+
::-webkit-scrollbar { width: 6px; height: 6px; }
11+
::-webkit-scrollbar-track { background: transparent; }
12+
::-webkit-scrollbar-thumb { background: #3A3836; border-radius: 3px; }
13+
::-webkit-scrollbar-thumb:hover { background: #4A4845; }
14+
::-webkit-scrollbar-corner { background: transparent; }
15+
input[type="number"]::-webkit-inner-spin-button,
16+
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
17+
input[type="number"] { -moz-appearance: textfield; }
18+
body {
19+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
20+
background: #1A1918;
21+
color: #E8E5DF;
22+
-webkit-font-smoothing: antialiased;
23+
user-select: none;
24+
-webkit-user-select: none;
25+
}
26+
input, textarea { user-select: text; -webkit-user-select: text; }
27+
</style>
28+
</head>
29+
<body>
30+
<div id="root"></div>
31+
<script type="module" src="/src/main.tsx"></script>
32+
</body>
33+
</html>

0 commit comments

Comments
 (0)