mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-05 22:53:38 +00:00
SpeechSynthesis.java: Simplify the SetVoiceByProperties parameters.
The `age` parameter is not useful as eSpeak does not use this when selecting voices. This is always set to `0` by TtsService.java. The `variant` parameter is not used to select the actual voice variant (from the `!v` directory) but to select the n^th matching voice from the list of matching voices. This is always set to select the first matching voice by TtsService.java.
This commit is contained in:
@@ -169,9 +169,8 @@ public class SpeechSynthesis {
|
||||
return voices;
|
||||
}
|
||||
|
||||
public void setVoiceByProperties(
|
||||
String name, String languages, int gender, int age, int variant) {
|
||||
nativeSetVoiceByProperties(name, languages, gender, age, variant);
|
||||
public void setVoiceByProperties(String name, String languages, int gender) {
|
||||
nativeSetVoiceByProperties(name, languages, gender);
|
||||
}
|
||||
|
||||
public void setRate(int rate) {
|
||||
@@ -301,8 +300,7 @@ public class SpeechSynthesis {
|
||||
|
||||
private native final String[] nativeGetAvailableVoices();
|
||||
|
||||
private native final boolean nativeSetVoiceByProperties(
|
||||
String name, String languages, int gender, int age, int variant);
|
||||
private native final boolean nativeSetVoiceByProperties(String name, String languages, int gender);
|
||||
|
||||
private native final boolean nativeSetRate(int rate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user