Skip to content

About

Offline lightweight singing synthesizer — independent per-track parameters, no pretraining, UTAU voicebank support

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

VocalB1

English | 中文 | 日本語

Offline lightweight singing synthesizer — lyrics / parameters / singers as managed data-blocks, lyric-driven formant targets, no pretraining, UTAU voicebank support.

VocalB1 decomposes a voice recording into F0 / spectral envelope / breath / excitation, then re-synthesizes a song from per-note parameters. No model training, no GPU, no network — pure signal processing that runs on a 2-core / 2 GB machine.

Since v3 a project contains exactly three data-block libraries: lyrics (complete scores), parameters (one node graph per parameter set) and singers (voicebank + lyric reference + parameter reference). Lyrics are one-to-one with singers; parameter sets may be shared. Tracks and the chorus stage have been removed. v2 projects open read-only and can still be rendered.


Features

  • Three data-block libraries — reference counts, fake users, orphan purge, external asset I/O
  • Lyrics own the score — words/units, segments, pitch line, vowel and F1~F7 formant targets
  • Node-graph parameters — a Blender-style canvas per parameter set: number / global / parameter inputs, time curves and gradients, noise, math, map range, mix, split/merge, curve remap, vowel and breath managers, voicebank-data and field-decompose inputs, and the four summary nodes (formant position / gain / bandwidth, breath) that plug into one output node. An unconnected summary keeps the voicebank/lyric default, so a partial graph is always valid
  • Singer overlay graphs — a singer owns a second, smaller graph whose unwired outputs inherit the shared parameter set, so a singer can offset a shared timbre without forking the data-block
  • Per-synthesis-frame evaluation — time, beat, pitch and vowel feed the graph; formant targets are applied to the spectral envelope every frame; cycles and unknown functions raise a structured StageException naming the node
  • Per-note control — pitch, beat position, breath level, formant position, decay curve
  • UTAU 単独音 voicebanks — 142 basic kana
  • Dual-mode sample resolution — phoneme names resolved from the voicebank, or one syllable overrides it with an absolute audio path
  • Voicebank decomposition — the engine measures formants, f0 and aperiodicity for every sample in memory (no sidecar file); the vowel manager drives F1~F7 from the singer's own resonances and the measured f0 calibrates the source pitch
  • Zero pretraining — no model weights, no dataset, no GPU
  • Offline — nothing leaves your machine
  • Desktop UI (C# / WPF) plus a plain command-line entry point
  • Fast enough to iterate — a 25-second song renders in about 60 seconds

Layout

.
├── VocalB1Synthesizer.py     # synthesis core
├── engine/
│   ├── VocalDecomposer.py    # audio -> parameters (.npy + .json)
│   ├── VocalSynthesizer.py   # rebuild speech from parameters
│   ├── VocalB1.py            # command-line entry
│   └── prosses_breath.py     # breath mixing helper
├── vocal_lib/                # F0 detection, formants, breath, glottal models
├── ui/                       # Windows desktop UI (C# / WPF)
│   ├── src/
│   └── engine.settings.example.json
├── languages/                # UI language packs (en / ja / zh)
├── voicebank/                # put your voicebank here (none is bundled)
├── scripts/
│   ├── node_scripts/         # sample external node scripts
│   │   └── average5.py       # five-input average, runs in the sandbox
│   └── package-release.ps1   # builds the release archives
├── installer/
│   └── vocalb1.iss           # Inno Setup definition for the installer
├── docs/                     # quick start and release notes
└── tools/                    # helper scripts (the engine does not need them)
    ├── spectrogram.py        # spectrogram view
    ├── oscilloscope.py       # waveform view
    ├── make_spectrogram.py   # spectrogram PNG for a rendered WAV
    ├── pit_editor.py         # pitch-curve editor
    ├── analyze_voicebank.py  # reports missing syllables in a voicebank
    ├── perf_render.py        # full render with the performance probe
    ├── probe_render.py       # replay a project and audit parameters
    ├── _plosive_diag.py      # plosive transient diagnostics
    └── test_vocal_lib.py     # library regression tests

The library has its own API reference: vocal_lib/README.md (English / 中文 / 日本語).


Requirements

  • Python 3.10+
  • Windows 10/11 for the desktop UI; the Python engine itself is cross-platform
pip install -r requirements.txt

matplotlib (spectrum / spectrogram) and pygame (preview playback) are optional — synthesis alone does not need them.

On Windows the requirements pull pyworld-prebuilt instead of pyworld, because upstream pyworld ships no wheels for Python 3.9+ (it would need a local MSVC build).


Quick start

1. Add a voicebank

Drag and drop — start VocalB1, then drag the voicebank folder onto the window. It is copied into voicebank/<name>/ and loaded immediately. The folder must contain at least one .wav and an icon.jpg.

Or place it yourself — put a UTAU 単独音 (single-note) voicebank folder inside voicebank/:

voicebank/
└── <your-voicebank>/
    ├── _あ.wav
    ├── ...
    └── icon.jpg

No voicebank is bundled, for licensing reasons — see voicebank/README.md.

2. Try the engine

python VocalB1Synthesizer.py

This renders the DEFAULT_SEGMENTS block near the top of that file into _output/.

3. Run the desktop UI

Open the solution under ui/src/ in Visual Studio and build VocalB1.App, or run the published VocalB1.App.exe. The UI talks to the Python engine as a separate process over a stdin/stdout JSON line protocol — no embedded interpreter.

No configuration is needed: the UI walks up from its own executable to find the directory containing VocalB1Synthesizer.py, and reads languages/ from there. To override anything, copy ui/engine.settings.example.json to ui/engine.settings.json (git-ignored) and edit it.


How the voicebank is located

Priority:

  1. VOCALB1_LIB environment variable (points straight at a voicebank directory)
  2. the first subdirectory of <repository>/voicebank/, sorted by name
  3. otherwise: error out with a hint

Parameters

Each note carries its own settings:

  • Target pitch — C4 ... A5
  • Beat position / length — 0.25 beat minimum, splittable in half
  • Breath level — mix ratio between breath and voiced signal
  • Formant follow ratio — how much formants track the pitch shift (0 = fixed, 1 = follows fully)
  • Decay curve — per-segment volume envelope

These live in the project file, so they can be edited and undone repeatedly.


Performance

Measured on a 2-core / 2 GB machine:

  • 4-5 notes: about 2-5 seconds
  • a 25-second song: about 60 seconds (0.42x real time)
  • re-rendering: same cost as the first render (the voicebank is re-analysed each time)


Building a release

.\scripts\package-release.ps1              # both variants
.\scripts\package-release.ps1 -Mode lite   # lite only

Reads VERSION, publishes the WPF app, optionally bundles an embedded Python, and writes dist/vocalb1-v<version>-win-x64-{full,lite}.zip plus SHA256SUMS.txt and RELEASE-NOTES.md.

Version numbers are bumped by the script, not by hand:

.\scripts\package-release.ps1 -Bump patch -Tag   # 1.0.0 -> 1.0.1, commits VERSION, tags v1.0.1

-Bump takes patch (bugfix), minor (new feature) or major (breaking change); -NoCommit leaves the change uncommitted and -Tag creates the annotated tag locally (never pushes).

The full step-by-step checklist — pre-flight, verification, GitHub Release, rollback and troubleshooting — is in docs/RELEASE.md. Both archives unpack into a single folder; the engine, ui/bridge/, languages/ and an empty voicebank/ are placed where the app auto-discovers them.

Licensing

Source code is released under the MIT license — see LICENSE. Scope and third-party licenses are listed in NOTICE.md.

Voicebanks are not covered. They are licensed by their respective rights holders; this project neither bundles nor redistributes any. Follow the terms of the voicebank you use — most allow personal non-commercial use and prohibit redistribution.


How this was built

The core algorithm is the author's own code: the synthesis pipeline in vocal_lib — voicebank analysis, pitch shifting, duration alignment, crossfade splicing, breath handling and loudness normalization. The design decisions, parameter choices and listening-based tuning are the author's as well.

AI coding assistants were used for the desktop interface, code refactoring, test code, data plumbing (passing and converting data between the modules inside vocal_lib), and the phase vocoder implementation. The author reviewed and verified the result.

The project uses open-source libraries (numpy, scipy, soundfile, pyworld) and contains no pretrained models.


Acknowledgements

  • Mingxuan — designed the application icon, and tests every release before it ships.

The icon is his work; see NOTICE.md for how it relates to the MIT license.


Contributing

Bug reports and UI-layer pull requests are welcome. Please read CONTRIBUTING.md before opening an issue or a pull request — it explains what is in scope and how contributions are licensed.


Author

Xichun Guo · 2026

Homepage: https://vocalb1.com

About

Offline lightweight singing synthesizer — independent per-track parameters, no pretraining, UTAU voicebank support

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages