Synthesis & Export 合成与导出
SXSEditor synthesizes singing voice using the SoulX-Singer diffusion model on ONNX Runtime. This page covers the synthesis pipeline, playback controls, quality settings, and WAV export.
SXSEditor 使用 SoulX-Singer 扩散模型在 ONNX Runtime 上合成歌声。本页涵盖合成管线、播放控制、质量设置和 WAV 导出。
How Synthesis Works 合成工作原理
When you press Play, SXSEditor runs the SVS pipeline:
按播放时,SXSEditor 会运行 SVS 管线:
- Prepares input: Collects MIDI notes, lyrics, pitch curve, and singer data.准备输入:收集 MIDI 音符、歌词、音高曲线和歌手数据。
- Processes text: Converts lyrics to phoneme sequences using language-specific processing.文本处理:使用语言特定处理将歌词转换为音素序列。
- Encodes: Runs 5 encoder models (text, pitch, note type, F0, condition embedding).编码:运行 5 个编码器模型(文本、音高、音符类型、F0、条件嵌入)。
- Runs diffusion: Iteratively denoises a mel spectrogram using the diffusion model.扩散:使用扩散模型迭代地对梅尔频谱图去噪。
- Vocalizes: Converts the mel spectrogram to a waveform using the vocoder.声码器:使用声码器将梅尔频谱图转换为波形。
- Plays audio: Outputs the waveform through the audio system.播放:通过音频系统输出波形。
The synthesis pipeline uses 9 ONNX model files in total. The model operates internally at 24000 Hz with a hop size of 480. Playback now defaults to 48000 Hz — the 24 kHz model output is linearly upsampled for playback. The first synthesis is always slower because all models must be loaded into GPU memory; subsequent syntheses reuse the loaded pipeline.
合成管线共使用 9 个 ONNX 模型文件。模型内部以 24000 Hz 运行,hop size 为 480。播放默认采样率现在为 48000 Hz——24 kHz 模型输出经线性上采样后播放。首次合成总是较慢,因为所有模型都要加载到 GPU 显存;之后的合成会复用已加载的管线。
Playback Controls 播放控制
- ▶ Play: Start synthesis and playback. On first play, the SVS pipeline initializes (loads models into GPU).▶ Play:开始合成与播放。首次播放时,SVS 管线会初始化(将模型加载到 GPU)。
- ⏸ Pause: Pause playback. Resume from the paused position.⏸ Pause:暂停播放。从暂停位置继续。
- ⏹ Stop: Stop playback and reset to the beginning.⏹ Stop:停止播放并重置到开头。
Fragment-Level Playback 片段级播放
In the Fragment Editor, ▶ Play synthesizes and plays only the current fragment. This is useful for quick previews while editing. It uses the "Preview Inference Parameters" from Settings (fewer diffusion steps = faster response).
在片段编辑器中,▶ Play 仅合成并播放当前片段。便于编辑时快速预览。它使用设置中的"预览推理参数"(扩散步数更少 = 响应更快)。
Synthesis Cancellation — a cancel button appears during synthesis (both preview and export). Cancellation is cooperative: GPU inference exits at safe checkpoints between diffusion steps, preventing the D3D device-hung crash that occurred with the old force-terminate approach. The cancellation is near-instant for Euler/Heun samplers and completes at the next sub-stage for STORK-2.
取消合成——合成过程中(预览和导出均支持)会出现取消按钮。取消为协作式:GPU 推理在扩散步之间的安全检查点退出,避免了旧的强制终止方式导致的 D3D 设备挂起崩溃。Euler/Heun 求解器下取消近乎即时,STORK-2 则在下一个 sub-stage 完成后退出。
Preview vs Export Quality 预览与导出质量
SXSEditor uses two sets of inference parameters. Preview uses fewer steps for faster response; Export uses more steps for higher quality. Both are configurable in Settings.
SXSEditor 使用两套推理参数。预览使用较少步数以加快响应;导出使用更多步数以获得更高音质。两者均可在设置中配置。
| Parameter参数 | Preview (Default)预览(默认) | Export (Default)导出(默认) | Range范围 |
|---|---|---|---|
| Diffusion Steps扩散步数 | 1616 | 3232 | 4–644–64 |
| CFG StrengthCFG 引导强度 | 3.03.0 | 3.03.0 | 0–100–10 |
| CFG RescaleCFG Rescale 系数 | 0.750.75 | 0.750.75 | 0–10–1 |
| Sampler求解器 | EulerEuler | EulerEuler | Euler / Heun / Extrapolated Euler / STORK-2Euler / Heun / Extrapolated Euler / STORK-2 |
Diffusion Sampler 扩散求解器
The sampler is the ODE solver used inside the diffusion loop. It decides how each denoising step combines model evaluations (NFE = number of function evaluations) into the mel-state update. Four solvers are available; the preview and export samplers are configured independently in Settings > Diffusion Sampler:
求解器是扩散循环中使用的 ODE 求解器,决定每个去噪步如何将模型推理(NFE = 模型评估次数)组合为 mel 状态更新。提供四种求解器;预览与导出的求解器可在 设置 > 扩散求解器 中独立配置:
- Euler (default) — 1 NFE/step. First-order explicit, midpoint time evaluation. Fastest, the original baseline.Euler(默认)— 每步 1 次推理。一阶显式,中点时间评估。最快,原始基线。
- Heun — 2 NFE/step. Second-order improved Euler (trapezoidal rule). Higher accuracy, roughly 2× inference time. Final step falls back to Euler to avoid
t > 1.Heun — 每步 2 次推理。二阶改进欧拉(梯形公式)。精度更高,推理时间约 2 倍。末步退化为 Euler 以避免t > 1越界。 - Extrapolated Euler — 1 NFE/step. Velocity-extrapolation heuristic inspired by STORK (ICLR 2026). Reuses the previous step's velocity for linear extrapolation; not the full stabilized RK formulation. Best when the velocity field changes smoothly; falls back to Euler when extrapolation is unsafe.Extrapolated Euler — 每步 1 次推理。受 STORK(ICLR 2026)启发的速度外推启发式。复用上一步速度做线性外推;非论文完整 stabilized RK 格式。速度场缓变时效果最佳;外推不安全时退化为 Euler。
- STORK-2 — 1 NFE/step. Paper-faithful Stabilized Taylor Orthogonal Runge-Kutta (Tan et al., ICLR 2026, arXiv:2505.24210). Runge-Kutta-Gegenbauer 2nd-order recurrence with 8 sub-stages and Taylor-expansion virtual NFE. Designed for stiff ODEs with extended stability region (~2s² = 128×); higher per-step algebraic cost than Euler.STORK-2 — 每步 1 次推理。论文原版 Stabilized Taylor Orthogonal Runge-Kutta(Tan et al., ICLR 2026, arXiv:2505.24210)。Runge-Kutta-Gegenbauer 二阶递推 + 8 个 sub-stage + Taylor 展开 virtual NFE。专为刚性 ODE 设计,稳定性域扩展约 2s²=128 倍;每步代数运算开销高于 Euler。
Extrapolated Euler and STORK-2 carry cross-step velocity state. In chunked preview inference (long fragments split into chunks), this state resets at each chunk boundary, reducing their benefit — for chunked previews prefer Euler or Heun. The Export dialog exposes a Sampler dropdown so you can override the export sampler per export without changing the global setting.
Extrapolated Euler 与 STORK-2 需要跨步速度状态。分块预览推理(长片段切成多块)时,每块边界都会重置状态,使其优势减弱——分块预览建议使用 Euler 或 Heun。导出对话框提供求解器下拉框,可在不修改全局设置的情况下为本次导出单独覆盖求解器。
Diffusion Steps 扩散步数
The diffusion model iteratively denoises a mel spectrogram. The number of steps controls the trade-off between quality and speed:
扩散模型会迭代地对梅尔频谱图去噪。步数控制质量与速度的权衡:
- More steps = higher quality, slower inference. Recommended for export: 32 steps.更多步数 = 更高音质,推理更慢。导出推荐:32 步。
- Fewer steps = faster inference, lower quality. Recommended for preview: 8–16 steps.更少步数 = 推理更快,音质略低。预览推荐:8–16 步。
- Range: 4–64 steps.范围:4–64 步。
CFG Strength CFG 引导强度
Classifier-Free Guidance (CFG) strength controls how closely the output adheres to the input conditions (notes, lyrics, pitch):
无分类器引导(CFG)强度控制输出与输入条件(音符、歌词、音高)的贴合程度:
- Higher values = more aligned with conditions, but may over-strengthen. Recommended: 1.0–5.0.较高值 = 更贴合条件,但可能过度强化。推荐:1.0–5.0。
- Set to 0 to skip unconditional prediction entirely. This roughly doubles synthesis speed since only the conditional pass runs.设为 0 可完全跳过无条件预测。由于只运行条件分支,合成速度约提升一倍。
- Range: 0–10.范围:0–10。
CFG Rescale CFG Rescale 系数
The CFG rescale coefficient mitigates over-guidance artifacts caused by high CFG strength. Recommended: 0.5–0.9. Range: 0–1.
CFG rescale 系数用于缓解高 CFG 强度造成的过度引导伪影。推荐:0.5–0.9。范围:0–1。
Exporting to WAV 导出为 WAV
Exporting a Single Fragment 导出单个片段
In the Fragment Editor, click 💿 Export:
在片段编辑器中,点击 💿 Export:
- The Export dialog opens, pre-filled with the export-quality parameters from Settings. You can override them for this export only: Sampler (Euler / Heun / Extrapolated Euler / STORK-2), Diffusion Steps, CFG Strength, CFG Rescale, Auto Shift, plus advanced options — Dynamic Thresholding (enable/disable, percentile 0.9–0.999) and CFG Schedule (constant / linear / cosine / custom) (the global Settings values are not changed).弹出 导出对话框,预填设置中的导出质量参数。可仅为本次导出覆盖:求解器(Euler / Heun / Extrapolated Euler / STORK-2)、扩散步数、CFG 强度、CFG Rescale、Auto Shift 以及高级选项——动态阈值(启用/禁用,百分位 0.9–0.999)和 CFG 调度(恒定 / 线性 / 余弦 / 自定义)(不会修改全局设置)。
- After confirming, the fragment is synthesized using the chosen parameters.确认后,片段按所选参数合成。
- A file save dialog appears. Choose a location and filename.弹出文件保存对话框。选择位置和文件名。
- The WAV file is saved at the selected export sample rate (default 48 kHz, selectable: 24 / 44.1 / 48 / 96 kHz, 16-bit PCM).WAV 文件按所选导出采样率保存(默认 48 kHz,可选:24 / 44.1 / 48 / 96 kHz,16-bit PCM)。
Exporting the Entire Project 导出整个项目
In the main window, click 📤 Export:
在主窗口中,点击 📤 Export:
- The Export dialog opens (same options as single-fragment export: Sampler, Diffusion Steps, CFG, Auto Shift, Dynamic Thresholding, CFG Schedule).弹出 导出对话框(选项与单片段导出相同:求解器、扩散步数、CFG、Auto Shift、动态阈值、CFG 调度)。
- All fragments are synthesized sequentially using the chosen parameters.所有片段按所选参数顺序合成。
- Fragments are mixed together according to their timeline positions.片段根据时间线位置混合在一起。
- A file save dialog appears. Choose a save location.弹出文件保存对话框。选择保存位置。
- The mixed WAV file is saved at the selected export sample rate (default 48 kHz, selectable: 24 / 44.1 / 48 / 96 kHz, 16-bit PCM). Accompaniment audio tracks are mixed into the export.混合后的 WAV 文件按所选导出采样率保存(默认 48 kHz,可选:24 / 44.1 / 48 / 96 kHz,16-bit PCM)。伴奏音轨会混入导出。
Export Progress 导出进度
During export, a progress indicator shows:
导出过程中,进度指示器会显示:
- Current fragment being processed.正在处理的当前片段。
- Overall progress percentage.总进度百分比。
- Status messages (preparing, synthesizing, encoding WAV, saving).状态消息(准备中、合成中、编码 WAV、保存中)。
Export-Time Options 导出时选项
The Export dialog exposes several options that can be overridden per export without changing global Settings:
导出对话框提供多项可仅为本次导出覆盖的选项,不会修改全局设置:
- Sampler selection — choose Euler / Heun / Extrapolated Euler / STORK-2 for the export diffusion pass (see Diffusion Sampler in Settings).求解器选择——为导出扩散过程选择 Euler / Heun / Extrapolated Euler / STORK-2(见设置中的扩散求解器)。
- Dynamic thresholding — enable/disable and adjust the percentile (0.9–0.999). When enabled, extreme values in the diffusion latent are clipped at the specified percentile, reducing artifacts from over-sharp predictions.动态阈值——启用/禁用并调整百分位(0.9–0.999)。启用后,扩散潜空间中的极端值按指定百分位裁剪,减少过度尖锐预测导致的伪影。
- CFG schedule — choose how CFG strength varies across diffusion steps: constant (same strength throughout), linear (ramp from high to low), cosine (smooth cosine curve), or custom (user-defined per-step values).CFG 调度——选择 CFG 强度在扩散步间的变化方式:恒定(全程相同强度)、线性(从高到低渐变)、余弦(平滑余弦曲线)或 自定义(用户逐步指定)。
Exporting LRC Lyrics 导出 LRC 歌词
A new 📄 Export LRC button in the toolbar allows exporting the project lyrics as a timed LRC file. The LRC file contains timestamped lyric lines synchronized with the project timeline, compatible with standard LRC players and karaoke software.
工具栏新增 📄 Export LRC 按钮可将项目歌词导出为带时间戳的 LRC 文件。LRC 文件包含与项目时间线同步的带时间戳歌词行,兼容标准 LRC 播放器和卡拉 OK 软件。
Multi-Segment Synthesis 多段合成
Long audio is synthesized in segments. SXSEditor aligns F0 across segments using absolute-time alignment and applies per-segment autoShift f0Shift for wide-range songs, so multi-segment prompt mel frame counts stay consistent with the single-segment path. The vocoder processes audio in chunks (default 1008 frames, overlap 8 frames) with crossfade stitching.
长音频会分段合成。SXSEditor 使用绝对时间对齐跨段的 F0,并针对宽音域片段应用 per-segment autoShift f0Shift,使多段 prompt mel 帧数与单段路径一致。声码器按分片处理音频(默认 1008 帧,重叠 8 帧),交叉淡入淡出拼接。
Output Format 输出格式
| Property属性 | Value值 |
|---|---|
| Format格式 | WAV (PCM)WAV(PCM) |
| Model Internal Rate模型内部采样率 | 24000 Hz (the SVS model always runs at 24 kHz)24000 Hz(SVS 模型始终以 24 kHz 运行) |
| Playback Sample Rate播放采样率 | 48000 Hz (default). 24 kHz model output is linearly upsampled.48000 Hz(默认)。24 kHz 模型输出经线性上采样。 |
| Bit Depth (export)位深度(导出) | 16-bit PCM16-bit PCM |
| Export Sample Rate (selectable)导出采样率(可选) | 24000, 44100, 48000 (default), 96000 Hz. Linear upsampling from the 24 kHz model rate.24000、44100、48000(默认)、96000 Hz。从 24 kHz 模型率线性上采样。 |
| Accompaniment Mixing伴奏混入 | Accompaniment tracks are mixed into the final export alongside vocal fragments.伴奏音轨与人声片段一起混入最终导出。 |
Performance Tips 性能优化建议
If synthesis is slow, try these adjustments:
如果合成速度慢,可尝试以下调整:
- Use a discrete GPU if available. CPU inference is significantly slower.如有 独立显卡 请使用。CPU 推理明显较慢。
- Reduce diffusion steps in Settings > Preview Inference Parameters. Default is 16; try 8 for faster preview.在设置 > 预览推理参数中 减少扩散步数。默认 16;可尝试 8 以加快预览。
- Set CFG Strength to 0 to skip unconditional prediction, roughly doubling speed.将 CFG Strength 设为 0 可跳过无条件预测,速度约提升一倍。
- Update GPU drivers to the latest version for best DirectML performance.更新显卡驱动 到最新版本以获得最佳 DirectML 性能。
- Use FP16 precision instead of FP32 for lower VRAM usage and faster inference on most GPUs.在大多数显卡上 使用 FP16 精度 代替 FP32 可降低显存占用并加快推理。
- The first synthesis is always slower — subsequent syntheses reuse the loaded pipeline.首次合成总是较慢——之后的合成会复用已加载的管线。
If the synthesized voice sounds wrong or has artifacts:
如果合成声音异常或有伪影:
- Check the reference audio — ensure it contains pure vocals with no background music or effects.检查参考音频——确保为纯人声,无背景音乐或效果。
- Check lyrics — every note must have the correct lyric. Missing or wrong lyrics cause phoneme errors.检查歌词——每个音符必须有正确歌词。缺失或错误歌词会导致音素错误。
- Check MIDI notes — verify pitches and timing match the intended melody.检查 MIDI 音符——确认音高和时序与预期旋律一致。
- Check model precision — if using INT8, try FP16 for higher quality.检查模型精度——如使用 INT8,可尝试 FP16 以获得更高音质。
- Increase diffusion steps — more steps = better quality (try 32 or 48 for export).增加扩散步数——更多步数 = 更高音质(导出可尝试 32 或 48 步)。