Browse Source

When specifying dialects of Vietnamese, specify the country code as well as the variant code.

master
Reece H. Dunn 12 years ago
parent
commit
0867c97336

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

new Voice("tr", "asia/tr", "tr", "tur", "", "", "", SpeechSynthesis.GENDER_MALE, "Turkish", "tr", "Bu, Türkçe dilinde seslendirilen örnek bir metindir"), new Voice("tr", "asia/tr", "tr", "tur", "", "", "", SpeechSynthesis.GENDER_MALE, "Turkish", "tr", "Bu, Türkçe dilinde seslendirilen örnek bir metindir"),
new Voice("ur", "test/ur", "ur", "urd", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Urdu", "ur", "This is a sample of text spoken in Urdu"), new Voice("ur", "test/ur", "ur", "urd", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Urdu", "ur", "This is a sample of text spoken in Urdu"),
new Voice("vi", "asia/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", "asia/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", "asia/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("vi-sgn", "asia/vi-sgn", "vi", "vie", "", "", "saigon", SpeechSynthesis.GENDER_MALE, "Vietnamese", "vi--saigon", "Đây là mẫu văn bản được đọc bằng Tiếng Việt (SAIGON)"),
new Voice("vi-hue", "asia/vi-hue", "vi", "vie", "VN", "VNM", "hue", SpeechSynthesis.GENDER_MALE, "Vietnamese", "vi-VN-hue", "Đây là mẫu văn bản được đọc bằng Tiếng Việt (Việt Nam,HUE)"),
new Voice("vi-sgn", "asia/vi-sgn", "vi", "vie", "VN", "VNM", "saigon", SpeechSynthesis.GENDER_MALE, "Vietnamese", "vi-VN-saigon", "Đây là mẫu văn bản được đọc bằng Tiếng Việt (Việt Nam,SAIGON)"),
new Voice("zh", "asia/zh", "zh", "zho", "", "", "", SpeechSynthesis.GENDER_MALE, "Chinese (Mandarin)", "zh", "This is a sample of text spoken in 中文"), new Voice("zh", "asia/zh", "zh", "zho", "", "", "", SpeechSynthesis.GENDER_MALE, "Chinese (Mandarin)", "zh", "This is a sample of text spoken in 中文"),
new Voice("zh-yue", "asia/zh-yue", "zh", "zho", "HK", "HKG", "", SpeechSynthesis.GENDER_MALE, "Chinese (Cantonese)", "zh-HK", "This is a sample of text spoken in 中文 (中華人民共和國香港特別行政區)"), new Voice("zh-yue", "asia/zh-yue", "zh", "zho", "HK", "HKG", "", SpeechSynthesis.GENDER_MALE, "Chinese (Cantonese)", "zh-HK", "This is a sample of text spoken in 中文 (中華人民共和國香港特別行政區)"),
}; };

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

locale = new Locale("hy", "", "arevmda"); locale = new Locale("hy", "", "arevmda");
} else if (name.equals("vi-hue")) { } else if (name.equals("vi-hue")) {
// 'hue' is for the Hue Province accent/dialect (Central Vietnamese). // 'hue' is for the Hue Province accent/dialect (Central Vietnamese).
locale = new Locale("vi", "", "hue");
locale = new Locale("vi", "VN", "hue");
} else if (name.equals("vi-sgn")) { } else if (name.equals("vi-sgn")) {
// 'sgn' is for the Saigon accent/dialect (South Vietnamese). // 'sgn' is for the Saigon accent/dialect (South Vietnamese).
locale = new Locale("vi", "", "saigon");
locale = new Locale("vi", "VN", "saigon");
} else if (name.equals("zh-yue")) { } else if (name.equals("zh-yue")) {
// Android/Java does not support macrolanguages. // Android/Java does not support macrolanguages.
locale = new Locale("zh", "HK"); locale = new Locale("zh", "HK");
mJavaToIanaCountryCode.put("GBR", "GB"); mJavaToIanaCountryCode.put("GBR", "GB");
mJavaToIanaCountryCode.put("PRT", "PT"); mJavaToIanaCountryCode.put("PRT", "PT");
mJavaToIanaCountryCode.put("USA", "US"); mJavaToIanaCountryCode.put("USA", "US");
mJavaToIanaCountryCode.put("VNM", "VN");
} }
} }

Loading…
Cancel
Save