Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
9c07e90
Instance-based dictionary
Cadlaxa Oct 4, 2025
fcde2b5
Merge branch 'master' of https://github.com/stakira/OpenUtau into SBP…
Cadlaxa Nov 8, 2025
fd90a8a
Merge branch 'master' of https://github.com/stakira/OpenUtau into SBP…
Cadlaxa Mar 19, 2026
ff17204
SBP Update
Cadlaxa Mar 19, 2026
ed9e368
implement GetTransitionBasicLengthMsByOto per child phonemizer
Cadlaxa Mar 19, 2026
38cd838
Fix DeVCCV test file to reflect correct pitch suffix
Cadlaxa Mar 19, 2026
962e785
Fix phoneme overrides method
Cadlaxa Mar 21, 2026
ae5d8a2
fix EN C+V ending timings
Cadlaxa Mar 29, 2026
27b10cc
Utilize ValidateAlias on AliasFormat
Cadlaxa Mar 29, 2026
9ea15af
Fix override timings
Cadlaxa Mar 31, 2026
5301558
Fix empty array bug
Cadlaxa Apr 1, 2026
25e4d30
LANG2JA phonemizers: fix timings for VCV banks
Cadlaxa Apr 9, 2026
aed17c1
Merge branch 'master' of https://github.com/stakira/OpenUtau into SBP…
Cadlaxa May 2, 2026
1e7fb1e
Fix conflicts with SBP
Cadlaxa May 2, 2026
b80b181
Merge branch 'master' of https://github.com/stakira/OpenUtau into SBP…
Cadlaxa May 2, 2026
63a79ea
Merge branch 'master' of https://github.com/stakira/OpenUtau into SBP…
Cadlaxa May 2, 2026
d9de4d8
Fixes in EN VCCV and ES VCCV
Cadlaxa May 3, 2026
92e35e7
Fix GetSymbols not updated from the pr conflict
Cadlaxa May 3, 2026
fce1b36
Implement CustomParameters
Cadlaxa May 10, 2026
50ebbfd
Don't include AssignAllAffixes in the CustomParameters
Cadlaxa May 10, 2026
68bd993
small fixes
Cadlaxa May 10, 2026
ae0bbee
fix double ending consonant for EN C+V
Cadlaxa May 15, 2026
7430073
Merge branch 'master' of https://github.com/stakira/OpenUtau into SBP…
Cadlaxa May 21, 2026
3935493
Proper isGlide phoneme struct
Cadlaxa May 21, 2026
0b54fe4
add YAML watcher
Cadlaxa May 22, 2026
43975ef
Add Presamp Watcher
Cadlaxa May 22, 2026
9db5bae
fix
Cadlaxa May 22, 2026
b85f965
Add "null" boundary + phoneme group fixes
Cadlaxa May 29, 2026
e827c95
Account for the negative overlap
Cadlaxa May 30, 2026
89de24e
Fix yamlData
Cadlaxa May 30, 2026
cf49163
fix glides in en-xsampa
Cadlaxa May 30, 2026
032ae64
Concatenate phoneme symbols with replacements
Cadlaxa Jun 1, 2026
7f2e23d
replace + with & and added parenthesis for phoneme groupings
Cadlaxa Jun 1, 2026
b27c98d
Fix yaml timings
Cadlaxa Jun 3, 2026
4168646
Fix EN C+P replacement group leftover
Cadlaxa Jun 9, 2026
0dadb5a
Native diphthong split
Cadlaxa Jun 10, 2026
2694fe2
Global dictionary
Cadlaxa Jun 10, 2026
2238d9c
Update C+V setSinger global dictionary
Cadlaxa Jun 10, 2026
edc10ea
fix FIL VCV & CVVC
Cadlaxa Jun 13, 2026
f2a0347
rework ValidateAlias on EN ARPA+
Cadlaxa Jun 15, 2026
906817f
fix yaml timings to override the 50ms endings + backup yaml rework
Cadlaxa Jun 17, 2026
fb1bba9
Merge branch 'master' of https://github.com/stakira/OpenUtau into SBP…
Cadlaxa Jun 17, 2026
f8fbe1a
fix yaml semantic versioning
Cadlaxa Jun 17, 2026
81972b6
Merge branch 'master' of https://github.com/stakira/OpenUtau into yam…
Cadlaxa Jun 17, 2026
385584a
Merge branch 'SBP-update' of https://github.com/Cadlaxa/OpenUtau into…
Cadlaxa Jun 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions OpenUtau.Core/Classic/PresampWatcher.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System;
using System.IO;
using Serilog;

namespace OpenUtau.Core {
public class PresampWatcher : IDisposable {
public bool Paused { get; set; }

private FileSystemWatcher watcher;
private Action reloadCallback;

public PresampWatcher(string path, Action reloadCallback) {
this.reloadCallback = reloadCallback;

watcher = new FileSystemWatcher(path);
watcher.Changed += OnFileChanged;
watcher.Created += OnFileChanged;
watcher.Deleted += OnFileChanged;
watcher.Renamed += OnFileChanged;
watcher.Error += OnError;

watcher.Filter = "presamp.ini";
// Set to false since presamp.ini is always at the root of the voicebank
watcher.IncludeSubdirectories = false;
watcher.EnableRaisingEvents = true;
}

private void OnFileChanged(object sender, FileSystemEventArgs e) {
if (Paused) {
return;
}
Log.Information($"Presamp File \"{e.FullPath}\" {e.ChangeType}");
reloadCallback?.Invoke();
}

private void OnError(object sender, ErrorEventArgs e) {
Log.Error($"Presamp Watcher error {e}");
}
public void Dispose() {
if (watcher != null) {
watcher.Dispose();
}
}
}
}
48 changes: 48 additions & 0 deletions OpenUtau.Core/Classic/YamlWatcher.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using System;
using System.IO;
using Serilog;

namespace OpenUtau.Core {
public class YamlWatcher : IDisposable {
public bool Paused { get; set; }

private FileSystemWatcher watcher;
private Action reloadCallback;

public YamlWatcher(string path, Action reloadCallback) {
this.reloadCallback = reloadCallback;

watcher = new FileSystemWatcher(path);
watcher.Changed += OnFileChanged;
watcher.Created += OnFileChanged;
watcher.Deleted += OnFileChanged;
watcher.Renamed += OnFileChanged;
watcher.Error += OnError;

// Filters specifically for .yaml.
watcher.Filter = "*.yaml";
watcher.IncludeSubdirectories = true;
watcher.EnableRaisingEvents = true;
}

private void OnFileChanged(object sender, FileSystemEventArgs e) {
if (Paused) {
return;
}
Log.Information($"YAML File \"{e.FullPath}\" {e.ChangeType}");

// Execute the refresh logic passed in during initialization
reloadCallback?.Invoke();
}

private void OnError(object sender, ErrorEventArgs e) {
Log.Error($"YAML Watcher error {e}");
}

public void Dispose() {
if (watcher != null) {
watcher.Dispose();
}
}
}
}
34 changes: 33 additions & 1 deletion OpenUtau.Core/DiffSinger/DiffSingerBasePhonemizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public abstract class DiffSingerBasePhonemizer : MachineLearningPhonemizer
IG2p g2p;
Dictionary<string, int> phonemeTokens;
DiffSingerSpeakerEmbedManager speakerEmbedManager;
private static int globalDsGeneration = 0;
private int localDsGeneration = 0;
private static YamlWatcher dsWatcher;
private static string currentlyWatchedDsDir;

string defaultPause = "SP";
protected virtual string GetDictionaryName()=>"dsdict.yaml";
Expand All @@ -35,9 +39,11 @@ public abstract class DiffSingerBasePhonemizer : MachineLearningPhonemizer
private bool _singerLoaded;

public override void SetSinger(USinger singer) {
if (_singerLoaded && singer == this.singer) return;
if (_singerLoaded && singer == this.singer && localDsGeneration == globalDsGeneration) return;
try {
localDsGeneration = globalDsGeneration;
_singerLoaded = _executeSetSinger(singer);
SetupYamlWatcher(rootPath);
} catch {
_singerLoaded = false;
throw;
Expand Down Expand Up @@ -103,6 +109,32 @@ private bool _executeSetSinger(USinger singer) {
return true;
}

private void SetupYamlWatcher(string directory) {
if (string.IsNullOrEmpty(directory) || currentlyWatchedDsDir == directory) {
return;
}

if (dsWatcher != null) {
dsWatcher.Dispose();
dsWatcher = null;
}

currentlyWatchedDsDir = directory;

if (Directory.Exists(directory)) {
dsWatcher = new YamlWatcher(directory, () => {
Log.Information($"[DiffSingerBasePhonemizer] Detected YAML change in {directory}. Reloading globally...");
System.Threading.Thread.Sleep(200);
globalDsGeneration++;

// Signal OpenUtau to re-run the timeline runner
if (this.singer != null) {
OpenUtau.Core.SingerManager.Inst.ScheduleReload(this.singer);
}
});
}
}

protected virtual IG2p LoadG2p(string rootPath, bool useLangId = false) {
//Each phonemizer has a delicated dictionary name, such as dsdict-en.yaml, dsdict-ru.yaml.
//If this dictionary exists, load it.
Expand Down
Loading
Loading