From 3a92ee34f25096496718d1eadcc07eee69602e9a Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Mon, 29 Apr 2013 10:53:54 +0100 Subject: [PATCH] Support the new voices. --- .../eSpeakTests/src/com/reecedunn/espeak/test/VoiceData.java | 4 +++- android/src/com/reecedunn/espeak/SpeechSynthesis.java | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/android/eSpeakTests/src/com/reecedunn/espeak/test/VoiceData.java b/android/eSpeakTests/src/com/reecedunn/espeak/test/VoiceData.java index a35589c9..7da46922 100644 --- a/android/eSpeakTests/src/com/reecedunn/espeak/test/VoiceData.java +++ b/android/eSpeakTests/src/com/reecedunn/espeak/test/VoiceData.java @@ -121,6 +121,7 @@ public class VoiceData new Voice("af", "other/af", "af", "afr", "", "", "", SpeechSynthesis.GENDER_MALE, "Afrikaans", "af", "Hierdie is 'n voorbeeld van gesproke teks in Afrikaans"), new Voice("am", "test/am", "am", "amh", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Amharic", "am", "ይሄ በአማርኛ ላይ የተነገረ ጽሑፍ ናሙና ነው።"), new Voice("an", "europe/an", "an", "arg", "", "", "", SpeechSynthesis.GENDER_MALE, "Aragonese", "an", "This is a sample of text spoken in Aragonese"), + new Voice("az", "test/az", "az", "aze", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Azerbaijani", "az", "This is a sample of text spoken in Azerbaijani"), new Voice("bg", "europe/bg", "bg", "bul", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Bulgarian", "bg", "Това е откъс от изговорен текст на български"), new Voice("bn", "test/bn", "bn", "ben", "", "", "", SpeechSynthesis.GENDER_MALE, "Bengali", "bn", "This is a sample of text spoken in Bengali"), new Voice("bs", "europe/bs", "bs", "bos", "", "", "", SpeechSynthesis.GENDER_MALE, "Bosnian", "bs", "This is a sample of text spoken in Bosnian"), @@ -160,7 +161,7 @@ public class VoiceData new Voice("ka", "asia/ka", "ka", "kat", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Georgian", "ka", "This is a sample of text spoken in Georgian"), new Voice("kl", "test/kl", "kl", "kal", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Greenlandic", "kl", "This is a sample of text spoken in Kalaallisut"), new Voice("kn", "asia/kn", "kn", "kan", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Kannada", "kn", "This is a sample of text spoken in Kannada"), - new Voice("ko", "test/ko", "ko", "kor", "", "", "", SpeechSynthesis.GENDER_MALE, "Korean", "ko", "한국어로 읽은 텍스트 샘플입니다."), + new Voice("ko", "asia/ko", "ko", "kor", "", "", "", SpeechSynthesis.GENDER_MALE, "Korean", "ko", "한국어로 읽은 텍스트 샘플입니다."), new Voice("ku", "asia/ku", "ku", "kur", "", "", "", SpeechSynthesis.GENDER_MALE, "Kurdish", "ku", "This is a sample of text spoken in Kurdish"), new Voice("la", "other/la", "la", "lat", "", "", "", SpeechSynthesis.GENDER_MALE, "Latin", "la", "This is a sample of text spoken in Latin"), new Voice("lt", "europe/lt", "lt", "lit", "", "", "", SpeechSynthesis.GENDER_MALE, "Lithuanian", "lt", "Tai teksto, sakomo lietuvių, pavyzdys"), @@ -191,6 +192,7 @@ public class VoiceData 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-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("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 中文 (中華人民共和國香港特別行政區)"), }; diff --git a/android/src/com/reecedunn/espeak/SpeechSynthesis.java b/android/src/com/reecedunn/espeak/SpeechSynthesis.java index affd750d..f0aa5480 100644 --- a/android/src/com/reecedunn/espeak/SpeechSynthesis.java +++ b/android/src/com/reecedunn/espeak/SpeechSynthesis.java @@ -127,8 +127,11 @@ public class SpeechSynthesis { // '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. + // 'hue' is for the Hue Province accent/dialect (Central Vietnamese). locale = new Locale("vi", "", "hue"); + } else if (name.equals("vi-sgn")) { + // 'sgn' is for the Saigon accent/dialect (South Vietnamese). + locale = new Locale("vi", "", "saigon"); } else if (name.equals("zh-yue")) { // Android/Java does not support macrolanguages. locale = new Locale("zh", "HK");