Vocal engine (wauvio/vocal)

v3 — Voices, personas and voicebanks

See it in action: Compare the built-in voices

VoiceModel

The identity of a voice: name, tune (engine gains), range_low/high (comfortable) and hard_low/high (absolute) as MIDI notes, five VowelTargets (F1–F3, bandwidths, gain, F0-tracking amounts), fixed upper formants f4–f6/b4–b6, singer’s formant (singer_formant_hz/_bw), glottal source (rd_base, aspiration, tilt_hz_min/max), vibrato defaults, synthetic (0–1: tighter bandwidths, steadier source, brighter uppers), consonant loci[4] (labial, alveolar, palatal, velar; F_locus = slope × F_vowel + intercept for F2 and F3, intercepts scaled by tract_scale()), and nasal parameters (nasal_zero_q, nasal_zero_depth, nasal_pole_hz, nasal_pole_gain, nasal_bw_widen). Tune holds out_scale 0.65, asp_gain 3, fric_gain 0.3, upper_gain 4.4, sing_gain 2.4, air_gain 0.1, pre_gain 1, f23_gain 30. Each singer owns its model, so rendering is thread-safe and voices can be tuned independently.

VoiceProfile

Everything that makes a character: id, display, language, notes, model, style (the “Normal” look), parse (lyric defaults), personas, natural_amount (recommended Singer::natural() strength).

Built-in voices

Registered in voices/voices.hpp (builtin_voices(), voice_ids()), each defined in voices/voice-<id>.hpp as voice_<id>(). make_voice(id_or_path, out, err) resolves a built-in id or reads a .wvc path.

IdDisplayCharacterRange (comfortable / hard)naturalPersonas
yuneYuneBright, clear Japanese female singing voice; peripheral vowels for clarity, tight resonances.52-88 / 40-960.3normal, soft
yune-oldYuneBright, clear Japanese female singing voice; peripheral vowels for clarity, tight resonances (synthetic 0.65).52-88 / 40-960.3airy, cool, dark, giddy, nervous, normal, power, shy, sleepy, soft, sweet, tearful
reihaReiha (玲羽)Cool, crystalline, airy: delicate, precise, slightly breathy, clear highs; detached and fragile rather than warm.55-91 / 43-980.25normal, soft
koharuKoharu (小春)Warm, punchy, expressive: full midrange, crisp consonants, slightly husky, energetic; grounded and chesty.50-86 / 38-940.35normal, soft
itsukiItsuki (樹)Deep, resonant, smooth male voice: rounded vowels, controlled vibrato, grainy when pushed; dark and restrained.41-67 / 36-760.25normal, soft
mioMio (澪)Calm, warm and smooth: a slightly darker, rounder cousin of Yune with a touch more breath, steady slower vibrato and gentle glides; soft consonants, flowing legato.51-86 / 40-940.27normal, soft
akariAkari (灯)Warm and luminous: a little brighter and more present than Yune with a stronger carrying formant, a livelier vibrato and clean, gently crisp consonants; glowing rather than icy.54-89 / 42-960.32normal, soft

Ranges are MIDI notes. yune-old is the previous default voice kept for A/B comparison; the personas column for yune-old shows the older, larger persona set (airy, cool, dark, giddy, nervous, normal, power, shy, sleepy, soft, sweet, tearful) while the current yune ships normal and soft. To add a voice, copy the closest voice-*.hpp, change its model/look/personas, include it in voices.hpp and add a line to builtin_voices().

Personas

A persona is a named, absolute “look” for the expressive Style fields (Persona {name, look}). A voice stays itself: its VoiceModel is untouched, persona values stay in a bounded envelope, and volume, velocity response, compression and devoicing are never changed. PersonaLibrary offers add, find, names, load(path), save(name, path, append). Text format: a persona NAME line followed by any Style field lines (others stay at the Normal look). Apply with apply_persona(lib, style, name, amount) or apply_persona_blend(lib, style, a, b, t, amount); blend_expressive() lerps only expressive fields (for vibrato fields where one side is -1 the explicit value wins). persona_morph_lanes() moves a note toward a persona over time using only fields that have a render channel (brightness, breathiness, tension, volume, growl, fry, air, register, formant shift, mouth opening).

Voicebank files (.wvc)

A voice can be exported to and loaded from a plain-text voicebank (save_profile, load_profile, profile_to_text, profile_from_text; extension VOICEBANK_EXT = .wvc; is_voicebank_path()). Loading starts from a copy of an existing voice so you can override a few values; unknown keys and malformed lines are errors, so typos are caught. Shipped banks are in yune-v3/voicebanks/.

LineMeaning
voice ID, display TEXT, language CODE, notes TEXT, natural_amount NProfile metadata
model_name TEXTVoiceModel name
range LOW HIGH HARD_LOW HARD_HIGHFour integers
vowel a|i|u|e|o F1 F2 F3 B1 B2 B3 GAIN F1_TRACK F2_TRACKOne vowel target
model KEY VALUEVoiceModel float (f4–f6, b4–b6, singer_formant_*, rd_base, aspiration, tilt_*, vib_*, synthetic, nasal_*)
locus PLACE S2 C2 S3 C3Place = labial, alveolar, palatal, velar
tune KEY VALUEEngine gain
style KEY VALUEDefault look (devoicing takes 0/1)
parse KEY 0|1merge_long_vowels, cute, particles
persona NAME + following field linesA persona block
#Comment

Inspect or export voices with voice_tool.

Full API listing

wauvio/vocal/yune-v3/persona.hpp

wauvio::vocal::v3::Free functions, constants and aliases

// A persona is a named, absolute "look" for the expressive Style fields. A voice stays itself:
// the identity (VoiceModel: tract proportions, vowel centres, source family) is not touched,
// and persona values are kept inside a bounded envelope.
// Blending lerps the expressive fields only; volume, velocity response, compression and
// devoicing are never changed by a persona.
inline const std::vector<float Style::*>& expressive_fields()
// lerp on the expressive fields. Vibrato fields use -1 as "voice default": if only one side
// is explicit the explicit value wins, so blending never produces a negative depth by accident.
inline Style blend_expressive(const Style& a, const Style& b, float t)

wauvio::vocal::v3::struct Persona

struct Persona
    std::string name;
    Style look;     // absolute values for the expressive fields

wauvio::vocal::v3::class PersonaLibrary

class PersonaLibrary
public:
    PersonaLibrary() = default;     // empty; each voice (voices/voice-*.hpp) supplies its own personas
    void add(const std::string& name, const Style& look) { map_[name] = Persona{ name, look }; }
    const Persona* find(const std::string& name) const { auto it = map_.find(name); return it == map_.end() ? nullptr : &it->second; }
    std::vector<std::string> names() const { std::vector<std::string> v; for (auto& kv : map_) v.push_back(kv.first); return v; }
    // Text format (one persona per block):
    //   persona sweet
    //   brightness 0.78      # any Style field name, others stay at the Normal look
    // Returns the number of personas read.
    size_t load(const std::string& path)
    bool save(const std::string& name, const std::string& path, bool append = false) const
// Moves the expressive fields of `s` toward persona `name` by `amount` (0..1). Unknown names
// are ignored (returns false).
inline bool apply_persona(const PersonaLibrary& lib, Style& s, const std::string& name, float amount = 1.f)
// Blend of two personas (t = 0 -> a, 1 -> b), then moved toward by `amount`.
inline bool apply_persona_blend(const PersonaLibrary& lib, Style& s, const std::string& a, const std::string& b, float t, float amount = 1.f)
// Lanes that morph a note's current look toward persona `name` over time. `amount` is a
// curve of 0..1 vs seconds. Only fields that have a render-level channel can move inside a
// note: brightness, breathiness, tension, volume, growl, fry, air, register, formant shift,
// mouth opening. Values are converted into the channel's own units.
inline std::vector<Lane> persona_morph_lanes(const Style& cur, const Persona& p, const Curve& amount, double t_end, double t_begin = 0.0)

wauvio/vocal/yune-v3/voices/profile.hpp

wauvio::vocal::v3::struct VoiceProfile

// A VoiceProfile is everything that makes one *character* what it is, kept out of the engine:
//   model     - tract proportions, vowel centres, source family, range, vibrato defaults (VoiceModel)
//   style     - the character's default look/behaviour (Style; the "Normal" persona)
//   parse     - lyric parsing defaults
//   personas  - the bounded variations this character can take (soft, sweet, ...)
//   natural_amount - recommended Singer::natural() strength
// Voices live in voices/voice-<id>.hpp (C++, typed). The same voice can be exported/loaded as a text voicebank (.wvc); the .wvc files live in voicebanks/.
            struct VoiceProfile
                std::string id = "voice";            // short key: "yune"
                std::string display = "Voice";       // human name
                std::string language = "ja";
                std::string notes;                   // one line of character description
                VoiceModel model;
                Style style;                         // the character's default (Normal) look
                ParseOptions parse;
                PersonaLibrary personas;
                float natural_amount = 0.6f;         // default strength for Singer::natural()
                inline const std::vector<std::string>& style_names()
                struct MF { const char* name; float VoiceModel::* p; };
                inline const std::vector<MF>& model_floats()
                struct TF { const char* name; float Tune::* p; };
                inline const std::vector<TF>& tune_floats()
                inline std::string fl(float x) {       // shortest text that reads back as the same float
                inline const char* VOW = "aiueo";
                inline const char* PLACES[4] = { "labial", "alveolar", "palatal", "velar" };
            inline std::string profile_to_text(const VoiceProfile& p)
            inline bool save_profile(const VoiceProfile& p, const std::string& path)
            // Parses profile text onto `out` (start from a copy of an existing voice to override a few values).
            // Returns false and sets *err on a malformed line; unknown keys are an error too, so typos are caught.
            inline bool profile_from_text(const std::string& text, VoiceProfile& out, std::string* err = nullptr)
            // Voicebank files use the .wvc extension.
            inline constexpr const char* VOICEBANK_EXT = ".wvc";
            inline bool is_voicebank_path(const std::string& s)
            inline bool load_profile(const std::string& path, VoiceProfile& out, std::string* err = nullptr)

wauvio/vocal/yune-v3/voices/voices.hpp

Free functions, constants and aliases

// Registry of the built-in voices. To add a voice: write voices/voice-<id>.hpp (copy the closest existing voice and
// change its model, look and personas), include it here and add one line to builtin_voices().
            inline const std::vector<std::pair<std::string, std::function<VoiceProfile()>>>& builtin_voices()
            inline std::vector<std::string> voice_ids() { std::vector<std::string> o; for (auto& kv : builtin_voices()) o.push_back(kv.first); return o; }
            // "yune" -> built-in voice; anything else is read as a .wvc file path. Returns false (and *err) if neither works.
            inline bool make_voice(const std::string& id_or_path, VoiceProfile& out, std::string* err = nullptr)

wauvio/vocal/yune-v3/voices/voice-yune.hpp

Free functions, constants and aliases

// Yune: the default Japanese female voice.
            inline VoiceProfile voice_yune()

wauvio/vocal/yune-v3/voices/voice-mio.hpp

Free functions, constants and aliases

// Mio (澪): a calm, warm relative of Yune
            inline VoiceProfile voice_mio()