### Install .NET SDK on Linux Source: https://github.com/stakira/openutau/wiki/Compiling-from-source Commands to install the .NET 8.0 SDK on Debian-based and Arch-based Linux distributions. ```bash sudo apt install dotnet-sdk-8.0 ``` ```bash sudo pacman -S dotnet-sdk ``` -------------------------------- ### Full character.yaml Example Source: https://github.com/stakira/openutau/wiki/tech-note-‐-character.yaml A comprehensive example demonstrating all configurable fields in `character.yaml`, including basic info, localized names, encoding, portrait settings, and detailed sub-bank configurations for voice colors and tone ranges. ```yaml name: 闇音レンリ・連続音Ver1.5 localized_names: en-US: Renri Yamine VCV Ver1.5 singer_type: utau text_file_encoding: shift_jis image: renri.bmp portrait: portrait.webp portrait_opacity: 0.67 portrait_height: 0 author: ゆずり voice: ゆずり version: 1.5 web: https://renrivoice.wixsite.com/renri-voice/utau default_phonemizer: OpenUtau.Plugin.Builtin.JapaneseVCVPhonemizer subbanks: - color: '' prefix: '' suffix: C5 tone_ranges: - C5-B7 - color: '' prefix: '' suffix: G4 tone_ranges: - G4-B4 - color: '' prefix: '' suffix: D4 tone_ranges: - D4-F#4 - color: '' prefix: '' suffix: A3 tone_ranges: - C1-C#4 - color: ↑ prefix: '' suffix: ↑ tone_ranges: - C1-B7 - color: Clear prefix: '' suffix: CC5 tone_ranges: - C5-B7 - color: Clear prefix: '' suffix: CG4 tone_ranges: - G4-B4 - color: Clear prefix: '' suffix: CD4 tone_ranges: - D4-F#4 - color: Clear prefix: '' suffix: CA3 tone_ranges: - C1-C#4 - color: Whisper prefix: '' suffix: WC5 tone_ranges: - C5-B7 - color: Whisper prefix: '' suffix: WG4 tone_ranges: - G4-B4 - color: Whisper prefix: '' suffix: WD4 tone_ranges: - D4-F#4 - color: Whisper prefix: '' suffix: WA3 tone_ranges: - C1-C#4 - color: Edge prefix: '' suffix: "'" tone_ranges: - C1-B7 ``` -------------------------------- ### Train en_us Arpabet Model Source: https://github.com/stakira/openutau/blob/master/py/README.md Commands to initialize the environment and start the training process for the en_us model. ```bash cd py pip install -r requirements.txt python g2p/train.py ``` -------------------------------- ### Custom Mapping Format Example Source: https://github.com/stakira/openutau/wiki/Phonemizers An alternative format for defining mappings, showing how lists and single items can be used for both 'from' and 'to' fields. ```yaml - from: [ae, n] to: [eh, ax, n] - from: b to: bh ``` -------------------------------- ### Locate Wine Binary Path on MacOS Source: https://github.com/stakira/openutau/wiki/Resamplers-and-Wavtools Commands to identify the installation path of the Wine executable on Intel and Silicon architectures. ```bash which wine ``` ```bash /usr/local/bin/wine32on64 ``` ```bash /opt/homebrew/bin/wine ``` -------------------------------- ### Install Wine Crossover on MacOS Source: https://github.com/stakira/openutau/wiki/Resamplers-and-Wavtools Use Homebrew to install the Wine Crossover cask after setting up the required tap. ```bash brew tap gcenx/wine brew install --cask --no-quarantine wine-crossover ``` -------------------------------- ### OpenUTAU Custom Pronunciation Dictionary Example Source: https://github.com/stakira/openutau/wiki/Compiling-G2p-Models Example of a custom pronunciation dictionary in YAML format for OpenUTAU. Ensure YAML files use UTF-8 encoding. Use ruamel.yaml for parsing/generating these files. ```yaml %YAML 1.2 --- symbols: - {symbol: aa, type: vowel} - {symbol: ae, type: vowel} - {symbol: ah, type: vowel} - {symbol: ao, type: vowel} - {symbol: aw, type: vowel} - {symbol: ay, type: vowel} - {symbol: b, type: stop} - {symbol: ch, type: affricate} - {symbol: d, type: stop} - {symbol: dh, type: fricative} - {symbol: eh, type: vowel} - {symbol: er, type: vowel} - {symbol: ey, type: vowel} - {symbol: f, type: fricative} - {symbol: g, type: stop} - {symbol: hh, type: aspirate} - {symbol: ih, type: vowel} - {symbol: iy, type: vowel} - {symbol: jh, type: affricate} - {symbol: k, type: stop} - {symbol: l, type: liquid} - {symbol: m, type: nasal} - {symbol: n, type: nasal} - {symbol: ng, type: nasal} - {symbol: ow, type: vowel} - {symbol: oy, type: vowel} - {symbol: p, type: stop} - {symbol: r, type: liquid} - {symbol: s, type: fricative} - {symbol: sh, type: fricative} - {symbol: t, type: stop} - {symbol: th, type: fricative} - {symbol: uh, type: vowel} - {symbol: uw, type: vowel} - {symbol: v, type: fricative} - {symbol: w, type: semivowel} - {symbol: y, type: semivowel} - {symbol: z, type: fricative} - {symbol: zh, type: fricative} entries: - grapheme: openutau phonemes: [ow, p, eh, n, w, uw, t, ah, w, uw] ``` -------------------------------- ### ES MAKKU Phonetic Input Example Source: https://github.com/stakira/openutau/wiki/Phonemizers Demonstrates phonetic input for the ES MAKKU (Spanish) phonemizer. Phonemes must be enclosed in brackets and separated by spaces. ```text [aa, n, y, ao, ng, hh, ah, s, eh, y ao] ``` -------------------------------- ### Custom Dictionary Entry Format Example Source: https://github.com/stakira/openutau/wiki/Phonemizers An alternative format for defining custom dictionary entries, demonstrating the structure for grapheme-phoneme pairs. ```yaml - grapheme: stars phonemes: s, t, aa, r, z - grapheme: drops phonemes: dr, aa, p, s ``` -------------------------------- ### OpenUTAU `ops` API Request Source: https://github.com/stakira/openutau/wiki/[PROPOSAL]-svs.io-‐-singing-voice-synthesis-backend-API This is an example request to the `ops` API to retrieve available backend operations. ```json { "op": "ops" } ``` -------------------------------- ### Define a Note in USTX Source: https://github.com/stakira/openutau/wiki/USTX-file-format Example of a note structure including pitch control points, vibrato parameters, and phoneme overrides. ```yaml - position: 1920 duration: 720 tone: 70 lyric: san pitch: data: - {x: -274.03845, y: 0, shape: io} - {x: -158.65384, y: -32.46212, shape: io} - {x: 40, y: 0, shape: io} snap_first: true vibrato: {length: 0, period: 175, depth: 25, in: 10, out: 10, shift: 0, drift: 0, vol_link: 0} phoneme_expressions: - {index: 0, abbr: clr, value: 1} - {index: 1, abbr: clr, value: 2} phoneme_overrides: - index: 1 phoneme: a - index: 0 offset: 65 ``` -------------------------------- ### Expression Control Configuration for ENUNU Source: https://github.com/stakira/openutau/wiki/ENUNU-NNSVS-Support Define style_format and styles in config.yaml to control expressions beyond voice color. This example shows configurations for p9 and p16 flags with various expression types. ```yaml extensions: # Other settings.... style_format: p9: #Flag key to write to UST format: "{0}{1}{2}{3}" #Flag format Please enclose in " index: [ldst, loud, nrml, soft] #Key Set for Expression p16: format: "s{0}s{1}r{2}b{3}p{4}" index: [Std, swt, rock, brth, pop] #Key Set for Expression styles: ldst: #Key to Expression name: Loudest #Expression name type: Numerical #Expression control type: Currently, only numeric values are supported. min: 0 max: 3 default_value: 0 flag: p9 #Flag key to write to UST loud: name: Loud type: Numerical min: 0 max: 3 default_value: 0 flag: p9 nrml: name: Normal type: Numerical min: 0 max: 3 default_value: 0 flag: p9 soft: name: Soft type: Numerical min: 0 max: 3 default_value: 0 flag: p9 Std: name: Standard type: Numerical min: 0 max: 3 default_value: 0 flag: p16 swt: name: Sweet type: Numerical min: 0 max: 3 default_value: 0 flag: p16 rock: name: Rock type: Numerical min: 0 max: 3 default_value: 0 flag: p16 brth: name: Breathy type: Numerical min: 0 max: 6 default_value: 0 flag: p16 pop: name: Pop type: Numerical min: 0 max: 3 default_value: 0 flag: p16 ``` -------------------------------- ### OpenUTAU `ops` API Response (Renderer with ML vocoder) Source: https://github.com/stakira/openutau/wiki/[PROPOSAL]-svs.io-‐-singing-voice-synthesis-backend-API Example response from the `ops` API for a renderer backend with an ML vocoder, detailing operations like `phonemize` and `synth_audio_samples`. ```json { "name": "SomeRenderer", "version": "1.0", "ops": [ { "op": "phonemize", "inputs": { "note_sequence": { "required": true } }, "outputs": { "f0": { "time_unit": "ms", "frame_duration": 5 }, "phoneme_sequence": { } } }, { "op": "synth_audio_samples", "inputs": { "f0": { "required": true, "time_unit": "ms", "frame_duration": 5 }, "phoneme_sequence": { "required": true }, "curve:gender": { "required": false, "range": [-100, 100], "scale": "linear" }, "curve:tension": { "required": false, "range": [-100, 100], "scale": "linear" }, "curve:strength": { "required": false, "range": [-20, 20], "scale": "db" } }, "outputs": { "audio_samples": { "channels": 1, "sample_rate": 44100, "sample_format": "int16" } } } ] } ``` -------------------------------- ### Trust OpenUtau DMG on macOS Source: https://github.com/stakira/openutau/wiki/FAQ If the DMG file itself cannot be opened due to security warnings, use this command in the terminal to trust the downloaded disk image. This allows you to open and install the application. ```bash xattr -rc ~/Downloads/OpenUtau-osx-x64.dmg ``` -------------------------------- ### Creating and Managing Projects Source: https://context7.com/stakira/openutau/llms.txt Demonstrates how to initialize a project, configure tracks and parts, add notes, and perform file I/O operations. ```csharp using OpenUtau.Core.Ustx; using OpenUtau.Core.Format; // Create a new project with default expressions UProject project = Ustx.Create(); // Configure project settings project.name = "My Song"; project.tempos = new List { new UTempo(0, 120) // 120 BPM at tick 0 }; project.timeSignatures = new List { new UTimeSignature(0, 4, 4) // 4/4 time at bar 0 }; // Create a track var track = new UTrack("Vocals"); project.tracks.Add(track); // Create a voice part var part = new UVoicePart { name = "Verse 1", trackNo = 0, position = 0, Duration = 1920 * 4 // 4 bars at 480 ticks/beat }; project.parts.Add(part); // Create notes (tone: C4=60, position/duration in ticks) var note1 = project.CreateNote(60, 0, 480); // C4, beat 1 note1.lyric = "la"; var note2 = project.CreateNote(62, 480, 480); // D4, beat 2 note2.lyric = "la"; var note3 = project.CreateNote(64, 960, 960); // E4, beats 3-4 note3.lyric = "la"; // Add notes to part part.notes.Add(note1); part.notes.Add(note2); part.notes.Add(note3); // Save project to USTX format Ustx.Save("my_song.ustx", project); // Load existing project UProject loaded = Ustx.Load("my_song.ustx"); ``` -------------------------------- ### Build OpenUtau via command line Source: https://github.com/stakira/openutau/wiki/Compiling-from-source Commands to navigate to the project directory, restore dependencies, and build the project. ```bash cd OpenUtau ``` ```bash dotnet restore OpenUtau dotnet build OpenUtau ``` -------------------------------- ### Working with Notes and Phonemes Source: https://context7.com/stakira/openutau/llms.txt Shows how to configure note properties, pitch points, vibrato settings, and expressions. ```csharp using OpenUtau.Core.Ustx; // Create a note with pitch and vibrato var note = UNote.Create(); note.position = 0; note.duration = 960; note.tone = 60; // C4 note.lyric = "hello[hh eh l ow]"; // Lyric with phonetic hint note.tuning = 10; // +10 cents tuning adjustment // Configure pitch points (portamento) note.pitch.data.Clear(); note.pitch.AddPoint(new PitchPoint(-50, 0, PitchPointShape.io)); // Start note.pitch.AddPoint(new PitchPoint(0, 0, PitchPointShape.io)); // Note onset note.pitch.AddPoint(new PitchPoint(100, 0, PitchPointShape.io)); // Stabilize // Configure vibrato note.vibrato.length = 70; // 70% of note length note.vibrato.period = 120; // Period in milliseconds note.vibrato.depth = 25; // Depth in cents note.vibrato.@in = 20; // Fade-in percentage note.vibrato.@out = 20; // Fade-out percentage note.vibrato.shift = 0; // Phase shift percentage note.vibrato.drift = 0; // Vertical offset // Set phoneme expressions note.SetExpression(project, track, "vel", new float?[] { 100 }); // Velocity note.SetExpression(project, track, "vol", new float?[] { 100 }); // Volume note.SetExpression(project, track, "atk", new float?[] { 100 }); // Attack // Clone note for copying var noteCopy = note.Clone(); ``` -------------------------------- ### Build DLL/dylib/SO Source: https://github.com/stakira/openutau/blob/master/cpp/README.md Use this command to build the shared library for your operating system. On Windows, omit the leading '//'. ```bash bazelisk build //worldline ``` -------------------------------- ### NNSVS `phonemize` API Response Source: https://github.com/stakira/openutau/wiki/[PROPOSAL]-svs.io-‐-singing-voice-synthesis-backend-API Example response for the NNSVS `phonemize` operation, returning the generated phoneme sequence. ```json { "phoneme_sequence": [...] // as defined earlier } ``` -------------------------------- ### Manipulating Notes in OpenUtau Source: https://context7.com/stakira/openutau/llms.txt Demonstrates adding, moving, resizing, changing lyrics, setting vibrato, and removing notes within an OpenUtau project. Requires DocManager and UVoicePart. ```csharp using OpenUtau.Core; using OpenUtau.Core.Ustx; // Get document manager singleton var docManager = DocManager.Inst; var project = docManager.Project; var part = project.parts[0] as UVoicePart; // Add a new note var newNote = project.CreateNote(60, 0, 480); newNote.lyric = "la"; docManager.StartUndoGroup("Add Note"); docManager.ExecuteCmd(new AddNoteCommand(part, newNote)); docManager.EndUndoGroup(); // Move notes (deltaPos in ticks, deltaTone in semitones) docManager.StartUndoGroup("Move Notes"); docManager.ExecuteCmd(new MoveNoteCommand(part, note, 480, 2)); // Move right 1 beat, up 2 semitones docManager.EndUndoGroup(); // Resize note docManager.StartUndoGroup("Resize Note"); docManager.ExecuteCmd(new ResizeNoteCommand(part, note, 240)); // Extend by 240 ticks docManager.EndUndoGroup(); // Change lyric docManager.StartUndoGroup("Change Lyric"); docManager.ExecuteCmd(new ChangeNoteLyricCommand(part, note, "new lyric")); docManager.EndUndoGroup(); // Set vibrato var newVibrato = note.vibrato.Clone(); newVibrato.length = 50; newVibrato.depth = 30; docManager.StartUndoGroup("Set Vibrato"); docManager.ExecuteCmd(new SetVibratoCommand(part, note, newVibrato)); docManager.EndUndoGroup(); // Remove notes docManager.StartUndoGroup("Remove Notes"); docManager.ExecuteCmd(new RemoveNoteCommand(part, notesToRemove)); docManager.EndUndoGroup(); ``` -------------------------------- ### Implementing a Batch Edit Source: https://context7.com/stakira/openutau/llms.txt Demonstrates creating a custom batch edit class using the command pattern for undoable operations. ```csharp using System.Collections.Generic; using OpenUtau.Core; using OpenUtau.Core.Editing; using OpenUtau.Core.Ustx; // Custom batch edit to transpose selected notes public class Transpose : BatchEdit { public string Name => "Transpose Notes"; private int deltaNoteNum; public Transpose(int semitones) { this.deltaNoteNum = semitones; } public void Run(UProject project, UVoicePart part, List selectedNotes, DocManager docManager) { // Use selected notes or all notes in part var notes = selectedNotes.Count > 0 ? selectedNotes : part.notes.ToList(); // Start undo group for atomic operation docManager.StartUndoGroup("Transpose"); foreach (var note in notes) { // Execute move command (0 position delta, N tone delta) docManager.ExecuteCmd(new MoveNoteCommand(part, note, 0, deltaNoteNum)); } // End undo group docManager.EndUndoGroup(); } } // Usage: var transpose = new Transpose(12); // Transpose up one octave transpose.Run(project, voicePart, selectedNotes, DocManager.Inst); ``` -------------------------------- ### NNSVS `synth_world_features` API Request Source: https://github.com/stakira/openutau/wiki/[PROPOSAL]-svs.io-‐-singing-voice-synthesis-backend-API Example request for the NNSVS `synth_world_features` operation, which takes a phoneme sequence and outputs WORLD features. ```json { "op": "synth_world_features", "phoneme_sequence": [...] // as defined earlier } ``` -------------------------------- ### NNSVS `phonemize` API Request Source: https://github.com/stakira/openutau/wiki/[PROPOSAL]-svs.io-‐-singing-voice-synthesis-backend-API Example request for the NNSVS `phonemize` operation, which takes a note sequence and outputs a phoneme sequence. ```json { "op": "phonemize", "note_sequence": { "phoneme_sequence": [...] // as defined earlier } } ``` -------------------------------- ### Manage Project File Formats Source: https://context7.com/stakira/openutau/llms.txt Handles loading and saving of USTX project files. Use the Ustx class for native file operations. ```csharp using OpenUtau.Core.Format; // USTX (OpenUtau native format) UProject project = Ustx.Load("project.ustx"); Ustx.Save("output.ustx", project); // Auto-save with recovery support Ustx.AutoSave("recovery.ustx", project); // Import MIDI // (Via UI: File > Import > MIDI) // Import VSQX (Vocaloid 4) // (Via UI: File > Import > VSQX) // Import MusicXML // (Via UI: File > Import > MusicXML) // Export WAV // (Via UI: File > Export > WAV) // Export MIDI // (Via UI: File > Export > MIDI) ``` -------------------------------- ### NNSVS `synth_world_features` API Response Source: https://github.com/stakira/openutau/wiki/[PROPOSAL]-svs.io-‐-singing-voice-synthesis-backend-API Example response for the NNSVS `synth_world_features` operation, returning WORLD features including `world_mgc`, `world_bap`, and `f0`. ```json { "world_mgc": [...], "world_bap": [...], "f0": [...] } ``` -------------------------------- ### Manage Wave Parts Source: https://context7.com/stakira/openutau/llms.txt Creates and manipulates audio wave parts for mixing. Requires loading the part into a project before accessing audio data. ```csharp using OpenUtau.Core.Ustx; // Create a wave part from audio file var wavePart = new UWavePart { FilePath = "/path/to/audio.wav", trackNo = 1, position = 0, skip = 0, // Skip beginning (ticks) trim = 0, // Trim end (ticks) fadein = 0, // Fade-in (ticks) fadeout = 0 // Fade-out (ticks) }; // Load and access audio data wavePart.Load(project); float[] samples = wavePart.Samples; int sampleRate = wavePart.sampleRate; int channels = wavePart.channels; double durationMs = wavePart.fileDurationMs; // Get trimmed samples for rendering var source = wavePart.TrimSamples(project); ``` -------------------------------- ### OpenUTAU `ops` API Response (NNSVS) Source: https://github.com/stakira/openutau/wiki/[PROPOSAL]-svs.io-‐-singing-voice-synthesis-backend-API Example response from the `ops` API for an NNSVS backend, detailing available operations like `phonemize` and `synth_world_features`. ```json { "name": "ENUNU", "version": "0.5.0", "ops": [ { "op": "phonemize", "inputs": { "note_sequence": { "required": true } }, "outputs": { "phoneme_sequence": { } } }, { "op": "synth_world_features", "inputs": { "phoneme_sequence": { "required": true } }, "outputs": { "world_mgc": { "time_unit": "ms", "frame_duration": 5, "width": 60 }, "world_bap": { "time_unit": "ms", "frame_duration": 5, "width": 5 }, "f0": { "time_unit": "ms", "frame_duration": 5 } } } ] } ``` -------------------------------- ### Troubleshoot BadDeviceId NAudio Exception Source: https://github.com/stakira/openutau/wiki/Known-Bugs Error log encountered when OpenUtau fails to initialize audio output devices. Changing hardware output devices may resolve this issue. ```text Failed to render BadDeviceId calling waveOutOpen NAudio.MmException: BadDeviceId calling waveOutOpen at NAudio.MmException.Try(MmResult result, String function) at NAudio.Wave.WaveOutEvent.Init(IWaveProvider waveProvider) at NAudio.Wave.WaveExtensionMethods.Init(IWavePlayer wavePlayer, ISampleProvider sampleProvider, Boolean convertTo16Bit) at OpenUtau.Audio.NAudioOutput.Init(ISampleProvider sampleProvider) in C:\projects\openutau\OpenUtau.Core\Audio\NAudioOutput.cs:line 52 at OpenUtau.Core.PlaybackManager.StartPlayback(Double startMs, MasterAdapter masterAdapter) in C:\projects\openutau\OpenUtau.Core\PlaybackManager.cs:line 118 at OpenUtau.Core.PlaybackManager.<>c__DisplayClass24_0.b__0() in C:\projects\openutau\OpenUtau.Core\PlaybackManager.cs:line 131 0.1.529.0 ``` -------------------------------- ### Adding Custom Dictionary Entries Source: https://github.com/stakira/openutau/wiki/Phonemizers Example of how to add custom pronunciation entries to `arpasing.yaml` to override default pronunciations or add new words. Supports Unicode characters. ```yaml entries: - {grapheme: hello, phonemes: [hh, ax, l, ow]} - {grapheme: 안녕하세요, phonemes: [aa, n, y, ao, ng, hh, ah, s, eh, y ao]} ``` -------------------------------- ### OpenUtau Plugin API Documentation Link Source: https://github.com/stakira/openutau/wiki/FAQ This link directs to the OpenUtau plugin API documentation. Developers can use this resource to learn how to create new phonemizers for unsupported voicebanks. ```markdown [OpenUtau plugin API documentation](https://github.com/stakira/OpenUtau/blob/master/OpenUtau.Core/Api/README.md) ``` -------------------------------- ### ENUNU Server Configuration (SimpleENUNUServer 0.5.0+) Source: https://github.com/stakira/openutau/wiki/ENUNU-NNSVS-Support Configure ENUNU server extensions for timing correction. This version uses timing_editor_2. ```yaml extensions: timing_editor_2: "%v/timing_auto_correct/enunu_timing_auto_correct.py" ``` -------------------------------- ### ENUNU Server Configuration (Older Versions) Source: https://github.com/stakira/openutau/wiki/ENUNU-NNSVS-Support Configure ENUNU server extensions for timing correction and voice synthesis. Delete the timing_editor line to disable timing correction. Setting wav_synthesizer to false allows pitch editing but results in low quality. ```yaml extensions: timing_editor: "%v/timing_auto_correct/enunu_timing_auto_correct.py" wav_synthesizer: synthe acoustic_calculator: nnsvs timing_calculator: nnsvs ust_converter: built-in ``` -------------------------------- ### Define Phoneme Symbols Source: https://github.com/stakira/openutau/wiki/Phonemizers Add new symbols and define their types (vowel, stop, fricative, etc.) for phonemizer recognition. Enclose symbols starting with special characters in single quotes. ```yaml symbols: - {symbol: ea, type: vowel} - {symbol: ix, type: vowel} - {symbol: dd, type: tap} - {symbol: j, type: fricative} - {symbol: '@r', type: vowel} ``` -------------------------------- ### Build Executable Version Source: https://github.com/stakira/openutau/blob/master/cpp/README.md Build an executable version of the project. Note that curve expressions will not be available with this build target. ```bash bazelisk build //worldline:main ``` -------------------------------- ### POST /ops Source: https://github.com/stakira/openutau/wiki/[PROPOSAL]-svs.io-‐-singing-voice-synthesis-backend-API Retrieves the list of all available operations, their required inputs, and expected output structures for the backend. ```APIDOC ## POST /ops ### Description This endpoint returns the capabilities of the backend, including supported operations, required input data structures, and output formats. It also serves as a health check. ### Method POST ### Endpoint /ops ### Request Body - **op** (string) - Required - Must be set to "ops" ### Request Example { "op": "ops" } ### Response #### Success Response (200) - **name** (string) - Name of the renderer/backend - **version** (string) - Version of the renderer/backend - **ops** (array) - List of available operations #### Response Example { "name": "ENUNU", "version": "0.5.0", "ops": [ { "op": "phonemize", "inputs": { "note_sequence": { "required": true } }, "outputs": { "phoneme_sequence": {} } } ] } ``` -------------------------------- ### OpenUtau Korean CV Configuration (Ko-CV.ini) Source: https://github.com/stakira/openutau/wiki/Phonemizers Configuration file for handling various forms of Korean CV voicebanks. If `Ko-CV.ini` is missing, a default one is generated. ```ini [CV] Use rentan=False Use 'shi' for '시'(otherwise 'si')=False Use 'i' for '의'(otherwise 'eui')=False [BATCHIM] Use 'aX' instead of 'a X'=False ``` -------------------------------- ### ES MAKKU Lyric Input with Phonetic Suggestion Source: https://github.com/stakira/openutau/wiki/Phonemizers Shows how to provide phonetic suggestions in brackets after the lyrical input for the ES MAKKU phonemizer. This must be done on the first syllable. ```text lyric input with phonetic suggestion in brackets ``` -------------------------------- ### Accessing Singer and Voicebank Information Source: https://context7.com/stakira/openutau/llms.txt Shows how to retrieve a singer from a track and access its metadata, phoneme mappings, and subbanks. Ensure the singer is loaded before querying. ```csharp using OpenUtau.Core.Ustx; // Access singer from track USinger singer = track.Singer; // Check singer status if (!singer.Found || !singer.Loaded) { singer.EnsureLoaded(); } // Get singer metadata string name = singer.Name; string location = singer.Location; // Voicebank directory path string author = singer.Author; string avatar = singer.Avatar; // Avatar image path // Query phoneme/alias mapping if (singer.TryGetMappedOto("あ", 60, "", out UOto oto)) { string alias = oto.Alias; // Actual alias with pitch suffix string file = oto.File; // WAV file path double offset = oto.Offset; // Offset in ms double consonant = oto.Consonant; double cutoff = oto.Cutoff; double preutter = oto.Preutter; double overlap = oto.Overlap; } // Query with voice color if (singer.TryGetMappedOto("あ", 60, "soft", out UOto coloredOto)) { // Returns alias matching "soft" voice color/subbank } // Get autocomplete suggestions var suggestions = singer.GetSuggestions("あ"); foreach (var suggestion in suggestions) { Console.WriteLine(suggestion.Alias); } // Access subbanks (multi-pitch, multi-color) foreach (var subbank in singer.Subbanks) { string color = subbank.Color; // Voice color name string prefix = subbank.Prefix; // Alias prefix string suffix = subbank.Suffix; // Alias suffix (pitch marker) var toneRange = subbank.toneSet; // Supported tone range } ``` -------------------------------- ### Expunge Build Cache and Dependencies Source: https://github.com/stakira/openutau/blob/master/cpp/README.md Cleans up the build cache and removes dependencies. This is a more thorough cleanup than `bazelisk clean`. ```bash bazelisk clean --expunge ``` -------------------------------- ### Build Custom G2p Dictionary Source: https://context7.com/stakira/openutau/llms.txt Constructs a G2p dictionary programmatically by adding symbols and word entries. Use this for custom pronunciation rules. ```csharp using OpenUtau.Api; // Build a custom G2p dictionary var dictionary = G2pDictionary.NewBuilder() // Add phoneme symbols with their types .AddSymbol("aa", "vowel") .AddSymbol("ae", "vowel") .AddSymbol("b", "stop") .AddSymbol("ch", "affricate") .AddSymbol("d", "stop") .AddSymbol("l", "liquid") .AddSymbol("r", "liquid") .AddSymbol("w", "semivowel") .AddSymbol("y", "semivowel") // Add word entries .AddEntry("hello", new[] { "hh", "eh", "l", "ow" }) .AddEntry("world", new[] { "w", "er", "l", "d" }) .AddEntry("openutau", new[] { "ow", "p", "eh", "n", "w", "uw", "t", "ah", "w", "uw" }) .Build(); // Query phonemes for a word string[] phonemes = dictionary.Query("hello"); // Result: ["hh", "eh", "l", "ow"] // Check symbol validity and type bool isValid = dictionary.IsValidSymbol("aa"); // true bool isVowel = dictionary.IsVowel("aa"); // true bool isGlide = dictionary.IsGlide("w"); // true (semivowel) // Parse phonetic hints from user input string[] parsed = dictionary.UnpackHint("hh eh l ow"); // Result: ["hh", "eh", "l", "ow"] (invalid symbols filtered out) ``` -------------------------------- ### Voicebank Metadata Configuration Source: https://github.com/stakira/openutau/wiki/Adding-support-for-a-new-synthesis-engine Configuration files defining basic voicebank information and engine-specific settings. ```ini name=Zhibin Diffsinger image=zhibin.png author=Chisong voice=Chisong web=http://zhibin.club/ ``` ```yaml text_file_encoding: utf-8 portrait_opacity: 0.67 default_phonemizer: OpenUtau.Core.DiffSinger.DiffSingerPhonemizer singer_type: diffsinger ``` -------------------------------- ### Japanese VCV Phonemizer Implementation Source: https://context7.com/stakira/openutau/llms.txt Implements a VCV (Vowel-Consonant-Vowel) phonemizer for Japanese voicebanks. It handles VCV aliases and fallbacks for accurate pronunciation. ```csharp using System.Collections.Generic; using System.Linq; using OpenUtau.Api; using OpenUtau.Core.Ustx; [Phonemizer("Japanese VCV Phonemizer", "JA VCV", language: "JA")] public class JapaneseVCVPhonemizer : Phonemizer { // Vowel lookup table: maps hiragana to tail vowel static readonly string[] vowels = new string[] { "a=あ,か,が,さ,ざ,た,だ,な,は,ば,ぱ,ま,や,ら,わ,a", "i=い,き,ぎ,し,じ,ち,ぢ,に,ひ,び,ぴ,み,り,i", "u=う,く,ぐ,す,ず,つ,づ,ぬ,ふ,ぶ,ぷ,む,ゆ,る,u", "e=え,け,げ,せ,ぜ,て,で,ね,へ,べ,ぺ,め,れ,e", "o=お,こ,ご,そ,ぞ,と,ど,の,ほ,ぼ,ぽ,も,よ,ろ,を,o", "n=ん,n", }; static readonly Dictionary vowelLookup; static JapaneseVCVPhonemizer() { vowelLookup = vowels.ToList() .SelectMany(line => { var parts = line.Split('='); return parts[1].Split(',').Select(cv => (cv, parts[0])); }) .ToDictionary(t => t.Item1, t => t.Item2); } private USinger singer; public override void SetSinger(USinger singer) => this.singer = singer; public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevNeighbour, Note? nextNeighbour, Note[] prevs) { var note = notes[0]; var currentLyric = note.lyric.Normalize(); // Build VCV alias: "a な" from previous vowel + current lyric string[] tests = new string[] { $"- {currentLyric}", currentLyric }; if (prevNeighbour != null) { var prevLyric = prevNeighbour.Value.lyric.Normalize(); var unicode = ToUnicodeElements(prevLyric); if (vowelLookup.TryGetValue(unicode.LastOrDefault() ?? "", out var vow)) { tests = new string[] { $"{vow} {currentLyric}", // VCV: "a な" $"* {currentLyric}", // Wildcard fallback currentLyric, // CV fallback $"- {currentLyric}" // Beginning alias }; } } // Try each alias until one matches in the voicebank foreach (string test in tests) { if (singer.TryGetMappedOto(test, note.tone, "", out var oto)) { return new Result { phonemes = new Phoneme[] { new Phoneme { phoneme = oto.Alias } } }; } } return MakeSimpleResult(currentLyric); } } ``` -------------------------------- ### Phonemizer Process Method Signature Source: https://github.com/stakira/openutau/blob/master/OpenUtau.Core/Api/README.md The main method to implement for a Phonemizer. It takes an array of notes and optional previous/next neighbor notes to produce an array of phonemes. The first note in the `notes` array contains the primary lyric. ```csharp public abstract Phoneme[] Process(Note[] notes, Note? prevNeighbour, Note? nextNeighbour); ``` -------------------------------- ### Implement a Custom Phonemizer in C# Source: https://context7.com/stakira/openutau/llms.txt Use the PhonemizerAttribute to register a class as a plugin. The Process method is required to convert lyrics into phonemes based on note context. ```csharp using OpenUtau.Api; using OpenUtau.Core.Ustx; // Register a phonemizer with name, tag, author, and language [Phonemizer("English Arpasing Phonemizer", "EN ARPA", author: "OpenUtau", language: "EN")] public class MyArpasingPhonemizer : Phonemizer { private USinger singer; // Store singer reference when user changes singer public override void SetSinger(USinger singer) { this.singer = singer; // Load singer-specific resources from singer.Location } // Main phoneme processing method public override Result Process(Note[] notes, Note? prev, Note? next, Note? prevNeighbour, Note? nextNeighbour, Note[] prevs) { var note = notes[0]; string lyric = note.lyric; // Handle phonetic hints like "read[r iy d]" if (!string.IsNullOrEmpty(note.phoneticHint)) { return MakeSimpleResult(note.phoneticHint); } // Return phoneme result return new Result { phonemes = new Phoneme[] { new Phoneme { phoneme = lyric, position = 0 // Position relative to note start in ticks } } }; } } ``` -------------------------------- ### Clone OpenUtau repository Source: https://github.com/stakira/openutau/wiki/Compiling-from-source Command to clone the OpenUtau source code from GitHub. ```bash git clone https://github.com/stakira/OpenUtau.git ```