diff --git a/OpenUtau.Core/Classic/VoicebankErrorChecker.cs b/OpenUtau.Core/Classic/VoicebankErrorChecker.cs
index 4b0d4e171..7b1d39ca9 100644
--- a/OpenUtau.Core/Classic/VoicebankErrorChecker.cs
+++ b/OpenUtau.Core/Classic/VoicebankErrorChecker.cs
@@ -72,7 +72,6 @@ public void Check() {
}
if (fileDuration <= 0) {
Errors.Add(new VoicebankError() {
- trace = oto.FileTrace,
soundFile = filePath,
messageKey = "singererror.invalidduration",
strings = new string[] { fileDuration.ToString() }
@@ -120,21 +119,18 @@ bool TryGetFileDuration(string filePath, Oto oto, out double fileDuration) {
var waveFormat = wav.ToSampleProvider().WaveFormat;
if (waveFormat.SampleRate != 44100) {
Errors.Add(new VoicebankError() {
- trace = oto.FileTrace,
soundFile = filePath,
messageKey = "singererror.samplerate"
});
}
if (waveFormat.Channels != 1) {
Infos.Add(new VoicebankError() {
- trace = oto.FileTrace,
soundFile = filePath,
messageKey = "singererror.mono"
});
}
if (waveFormat.BitsPerSample != 16) {
Errors.Add(new VoicebankError() {
- trace = oto.FileTrace,
soundFile = filePath,
messageKey = "singererror.bitdepth"
});
@@ -142,7 +138,6 @@ bool TryGetFileDuration(string filePath, Oto oto, out double fileDuration) {
}
} catch (Exception e) {
Errors.Add(new VoicebankError() {
- trace = oto.FileTrace,
soundFile = filePath,
messageKey = "singererror.soundnotopened",
e = e,
@@ -165,8 +160,7 @@ bool CheckOto(Oto oto, double fileDuration) {
if (oto.Offset > fileDuration) {
Errors.Add(new VoicebankError() {
trace = oto.FileTrace,
- messageKey = "singererror.offsetoutofduration",
- strings = new string[] { fileDuration.ToString() }
+ messageKey = "singererror.offsetoutofduration"
});
valid = false;
}
@@ -180,8 +174,7 @@ bool CheckOto(Oto oto, double fileDuration) {
if (oto.Preutter + oto.Offset > fileDuration) {
Errors.Add(new VoicebankError() {
trace = oto.FileTrace,
- messageKey = "singererror.preutteroutofduration",
- strings = new string[] { fileDuration.ToString() }
+ messageKey = "singererror.preutteroutofduration"
});
valid = false;
}
@@ -195,16 +188,14 @@ bool CheckOto(Oto oto, double fileDuration) {
if (oto.Consonant + oto.Offset > fileDuration) {
Errors.Add(new VoicebankError() {
trace = oto.FileTrace,
- messageKey = "singererror.consonantoutofduration",
- strings = new string[] { fileDuration.ToString() }
+ messageKey = "singererror.consonantoutofduration"
});
valid = false;
}
if (oto.Overlap + oto.Offset > fileDuration) {
Errors.Add(new VoicebankError() {
trace = oto.FileTrace,
- messageKey = "singererror.overlapoutofduration",
- strings = new string[] { fileDuration.ToString() }
+ messageKey = "singererror.overlapoutofduration"
});
valid = false;
}
@@ -230,6 +221,13 @@ bool CheckOto(Oto oto, double fileDuration) {
});
valid = false;
}
+ if (cutoff > fileDuration) {
+ Errors.Add(new VoicebankError() {
+ trace = oto.FileTrace,
+ messageKey = "singererror.cutoffoutofduration"
+ });
+ valid = false;
+ }
if (oto.Alias.StartsWith(" ") || oto.Alias.EndsWith(" ")) {
Infos.Add(new VoicebankError() {
diff --git a/OpenUtau/Strings/Strings.axaml b/OpenUtau/Strings/Strings.axaml
index 0d04653cf..c18e7e1a3 100644
--- a/OpenUtau/Strings/Strings.axaml
+++ b/OpenUtau/Strings/Strings.axaml
@@ -494,9 +494,10 @@ Warning: this option removes custom presets.
Alias contains multiple spaces.
Alias starts or ends with a space.
Bit depth of the sound file is not 16bit.
- Consonant out of sound file duration {fileDuration}.
+ Consonant out of sound file duration.
Consonant must be >= 0.
Cutoff must be to the right of consonant.
+ Cutoff out of sound file duration.
Cutoff must be to the right of overlap.
Cutoff must be to the right of preutter.
There are duplicate aliases.{0}
@@ -506,10 +507,10 @@ The voicebank may not work on another OS with case-sensitivity.
Invalid duration {0}.
Invalid oto format.
Sound file is not mono channel.
- Offset out of sound file duration {fileDuration}.
+ Offset out of sound file duration.
Offset must be >= 0.
- Overlap out of sound file duration {fileDuration}.
- Preutter out of sound file duration {fileDuration}.
+ Overlap out of sound file duration.
+ Preutter out of sound file duration.
Preutter must be >= 0.
Sample rate of the sound file is not 44100Hz.
Sound file missing