-
Notifications
You must be signed in to change notification settings - Fork 2
Developer Guide
SXSEditor Dev edited this page May 10, 2026
·
1 revision
- Prerequisites
- Build from Source
- Project Structure
- Tech Stack
- ONNX Models
- Testing
- Packaging & Distribution
- Contributing
- Node.js >= 18
- npm >= 9
- Windows (primary target; macOS/Linux supported via Electron Forge makers)
-
ONNX models: Download the SoulX-Singer ONNX models into
onnx_models/ - Git
git clone https://github.com/Henley04/SXSEditor.git
cd SXSEditor
npm installIf you encounter native module build issues:
npx electron-rebuildnpm startThis starts the application with hot reload via webpack.
SXSEditor/
├── assets/ # Application icons and images
├── docs/ # Documentation & official website
│ ├── index.html # Official website (GitHub Pages)
│ ├── css/ # Website styles
│ ├── js/ # Website scripts
│ └── wiki/ # Wiki content
├── example/ # Example prompt/target data
├── onnx_models/ # ONNX model files
│ ├── svc/ # SVC-specific models
│ └── README.md
├── src/
│ ├── audio/ # WAV encoder and audio utilities
│ ├── editor/ # Track manager, piano roll, envelope editor
│ ├── inference/ # ONNX inference pipelines
│ │ ├── nativeSvsPipeline.js # Main SVS pipeline
│ │ ├── rmvpePitchDetector.js # RMVPE-based F0 detection
│ │ ├── basicPitch.js # Basic Pitch F0 detection
│ │ ├── midiParser.js # MIDI parsing utilities
│ │ └── en_g2p_dict.json # English grapheme-to-phoneme dictionary
│ ├── main.js # Electron main process
│ ├── preload.js # Preload script for secure IPC
│ ├── renderer.js # Main renderer process (UI logic)
│ ├── index.html / .css # Main window
│ ├── fragmentEditor.* # Fragment editor window
│ ├── singerCreator.* # Singer creation window
│ ├── audioPreprocess.* # Audio preprocessing window
│ └── settings.* # Settings window
├── test/ # Automated test suite (160+ tests)
├── forge.config.js # Electron Forge configuration
├── webpack.*.config.js # Webpack configurations
└── package.json
| Category | Technology |
|---|---|
| Frontend | Vanilla JavaScript, HTML5 Canvas, Wavesurfer.js |
| Desktop Framework | Electron + Electron Forge |
| Build Tool | Webpack (@electron-forge/plugin-webpack) |
| Inference Engine | ONNX Runtime Node (onnxruntime-node) |
| Neural Models | SoulX-Singer (Diffusion-based SVS) |
| Pitch Detection | RMVPE ONNX, Basic Pitch (TensorFlow.js) |
| Testing | Mocha + Chai + Sinon + NYC |
| Model | Purpose |
|---|---|
note_text_encoder.onnx |
Phoneme ID embedding |
note_pitch_encoder.onnx |
Note pitch embedding |
note_type_encoder.onnx |
Note type embedding |
f0_encoder.onnx |
Quantized F0 embedding |
preflow.onnx |
ConvNeXtV2 pre-processing |
cond_emb.onnx |
Condition embedding projection |
diff_step_dml.onnx |
Single diffusion step (DiffLlama) |
vocoder.onnx |
Vocos vocoder (mel → waveform) |
mel_transform.onnx |
Mel-spectrogram extraction |
Additional models for Singing Voice Conversion tasks.
| Parameter | Value |
|---|---|
| Sample Rate | 24000 Hz |
| Hop Size | 480 (20 ms) |
| FFT Size | 1920 |
| Window Size | 1920 |
| Mel Bins | 128 |
| F0 Range | C1 ~ B6 (32.7 Hz ~ 1975.5 Hz) |
npm test # Run full test suite
npm run test:coverage # With code coverage report
npm run test:watch # Watch modeThe test suite includes 160+ test cases covering:
- WAV encoding/decoding
- Track management
- SVS pipeline logic
- Pitch detection (RMVPE)
- MIDI parsing
- Integration tests
npm run package # Package for current platform
npm run make # Create distributables (.exe, .zip, .deb)The packaging uses Electron Forge with makers configured for:
- Windows: Squirrel installer (.exe)
- macOS: DMG (.dmg)
- Linux: DEB (.deb) and RPM (.rpm)
Contributions are welcome! Here's how to get started:
- Fork the repository
-
Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
-
Run tests to ensure nothing is broken (
npm test) - Commit with a descriptive message referencing the issue number
- Push to your fork
- Open a Pull Request
For major changes, open an issue first to discuss what you would like to change.
- JavaScript: Vanilla JS with modern ES features
- Follow existing patterns and conventions in the codebase
- Maintain test coverage for new functionality