DroidFish: Improved Spanish text to speech.

This commit is contained in:
Peter Osterlund 2017-01-01 20:44:39 +01:00
parent 7cc84a2b6e
commit 827febd8e1
2 changed files with 25 additions and 11 deletions

View File

@ -279,6 +279,8 @@ public class Speech {
} }
private static String fromToString(String from, Language lang) { private static String fromToString(String from, Language lang) {
if ("b4".equals(from)) // Some TTS systems convert "b4" to "before"
from = "b 4";
switch (lang) { switch (lang) {
case EN: case EN:
if ("a".equals(from)) if ("a".equals(from))
@ -295,7 +297,19 @@ public class Speech {
} }
private static String toToString(String to, Language lang) { private static String toToString(String to, Language lang) {
if ("b4".equals(to)) // Some TTS systems convert "b4" to "before"
to = "b 4";
switch (lang) {
case EN:
return to; return to;
case DE:
return to;
case ES:
return to;
case NONE:
return "";
}
throw new IllegalArgumentException();
} }
private static String captureToString(String to, Language lang) { private static String captureToString(String to, Language lang) {