Browse Source

Correctly handle the new vi-hue language.

master
Reece H. Dunn 12 years ago
parent
commit
c6cca792ee

+ 1
- 0
android/eSpeakTests/src/com/reecedunn/espeak/test/VoiceData.java View File

@@ -200,6 +200,7 @@ public class VoiceData
new Voice("tt", "test/tt", "tt", "tat", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Tatar", "tt", "This is a sample of text spoken in Tatar"),
new Voice("ur", "test/ur", "ur", "urd", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Urdu", "ur", "This is a sample of text spoken in Urdu"),
new Voice("vi", "vi", "vi", "vie", "", "", "", SpeechSynthesis.GENDER_MALE, "Vietnamese", "vi", "Đây là mẫu văn bản được đọc bằng Tiếng Việt"),
new Voice("vi-hue", "vi-hue", "vi", "vie", "", "", "hue", SpeechSynthesis.GENDER_MALE, "Vietnamese", "vi--hue", "Đây là mẫu văn bản được đọc bằng Tiếng Việt (HUE)"),
new Voice("wo", "test/wo", "wo", "wol", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Wolof", "wo", "This is a sample of text spoken in Wolof"),
new Voice("zh", "zh", "zh", "zho", "", "", "", SpeechSynthesis.GENDER_MALE, "Chinese (Mandarin)", "zh", "This is a sample of text spoken in 中文"),
new Voice("zh-yue", "zh-yue", "zh", "zho", "HK", "HKG", "", SpeechSynthesis.GENDER_MALE, "Chinese (Cantonese)", "zh-HK", "This is a sample of text spoken in 中文 (中華人民共和國香港特別行政區)"),

+ 3
- 0
android/src/com/reecedunn/espeak/SpeechSynthesis.java View File

@@ -126,6 +126,9 @@ public class SpeechSynthesis {
} else if (name.equals("hy-west")) {
// 'west' is not a country code.
locale = new Locale("hy", "", "arevmda");
} else if (name.equals("vi-hue")) {
// 'hue' is not a country code, so treat it as a variant code.
locale = new Locale("vi", "", "hue");
} else if (name.equals("zh-yue")) {
// Android/Java does not support macrolanguages.
locale = new Locale("zh", "HK");

Loading…
Cancel
Save