We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b037ae commit b147692Copy full SHA for b147692
core/src/main/java/dev/felnull/itts/core/voice/VoiceManager.java
@@ -128,7 +128,14 @@ public Optional<VoiceType> getVoiceType(String id) {
128
public VoiceType getDefaultVoiceType() {
129
return getAvailableVoiceTypes().values().stream()
130
.flatMap(Collection::stream)
131
- .min(Comparator.comparingInt(vt -> voiceTextManager.getCategory() == vt.getCategory() ? 1 : 0))
+ .max(Comparator.comparingInt(vt -> {
132
+ if (voiceTextManager.getCategory() == vt.getCategory()) {
133
+ return -1;
134
+ } else if (voicevoxManager.getCategory() == vt.getCategory()) {
135
+ return 1;
136
+ }
137
+ return 0;
138
+ }))
139
.orElse(null);
140
}
141
0 commit comments