eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

VoiceData.java 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. /*
  2. * Copyright (C) 2012-2013 Reece H. Dunn
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package com.reecedunn.espeak.test;
  17. import com.reecedunn.espeak.SpeechSynthesis;
  18. public class VoiceData
  19. {
  20. public static class Voice
  21. {
  22. public final String name;
  23. public final String identifier;
  24. public final String ianaLanguage;
  25. public final String javaLanguage;
  26. public final String ianaCountry;
  27. public final String javaCountry;
  28. public final String variant;
  29. public final int gender;
  30. public final String displayName;
  31. public final String locale;
  32. public final String sampleText;
  33. public final String sampleTextAlt;
  34. public Voice(String name,
  35. String identifier,
  36. String ianaLanguage,
  37. String javaLanguage,
  38. String ianaCountry,
  39. String javaCountry,
  40. String variant,
  41. int gender,
  42. String displayName,
  43. String locale,
  44. String sampleText)
  45. {
  46. this.name = name;
  47. this.identifier = identifier;
  48. this.ianaLanguage = ianaLanguage;
  49. this.javaLanguage = javaLanguage;
  50. this.ianaCountry = ianaCountry;
  51. this.javaCountry = javaCountry;
  52. this.variant = variant;
  53. this.gender = gender;
  54. this.displayName = displayName;
  55. this.locale = locale;
  56. this.sampleText = sampleText;
  57. this.sampleTextAlt = sampleText;
  58. }
  59. public Voice(String name,
  60. String identifier,
  61. String ianaLanguage,
  62. String javaLanguage,
  63. String ianaCountry,
  64. String javaCountry,
  65. String variant,
  66. int gender,
  67. String displayName,
  68. String locale,
  69. String sampleText,
  70. String sampleTextAlt)
  71. {
  72. this.name = name;
  73. this.identifier = identifier;
  74. this.ianaLanguage = ianaLanguage;
  75. this.javaLanguage = javaLanguage;
  76. this.ianaCountry = ianaCountry;
  77. this.javaCountry = javaCountry;
  78. this.variant = variant;
  79. this.gender = gender;
  80. this.displayName = displayName;
  81. this.locale = locale;
  82. this.sampleText = sampleText;
  83. this.sampleTextAlt = sampleTextAlt;
  84. }
  85. }
  86. public static class Exception extends AssertionError
  87. {
  88. private static final long serialVersionUID = 1L;
  89. public Exception(Voice voice, String context, AssertionError error)
  90. {
  91. super("Voice \"" + voice.name + "\" " + context + " -- " + error);
  92. }
  93. }
  94. public static final Voice[] voices = new Voice[] {
  95. new Voice("af", "other/af", "af", "afr", "", "", "", SpeechSynthesis.GENDER_MALE, "Afrikaans", "af", "Hierdie is 'n voorbeeld van gesproke teks in Afrikaans"),
  96. new Voice("am", "test/am", "am", "amh", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Amharic", "am", "ይሄ በአማርኛ ላይ የተነገረ ጽሑፍ ናሙና ነው።", "ይሄ በAmharic ላይ የተነገረ ጽሑፍ ናሙና ነው።"),
  97. new Voice("an", "europe/an", "an", "arg", "", "", "", SpeechSynthesis.GENDER_MALE, "Aragonese", "an", "This is a sample of text spoken in Aragonese"),
  98. new Voice("az", "test/az", "az", "aze", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Azerbaijani", "az", "This is a sample of text spoken in Azerbaijani"),
  99. new Voice("bg", "europe/bg", "bg", "bul", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Bulgarian", "bg", "Това е откъс от изговорен текст на български"),
  100. new Voice("bn", "test/bn", "bn", "ben", "", "", "", SpeechSynthesis.GENDER_MALE, "Bengali", "bn", "This is a sample of text spoken in বাংলা", "This is a sample of text spoken in Bengali"),
  101. new Voice("bs", "europe/bs", "bs", "bos", "", "", "", SpeechSynthesis.GENDER_MALE, "Bosnian", "bs", "This is a sample of text spoken in Bosnian"),
  102. new Voice("ca", "europe/ca", "ca", "cat", "", "", "", SpeechSynthesis.GENDER_MALE, "Catalan", "ca", "Aquesta és una mostra de text llegit en veu alta en català"),
  103. new Voice("cs", "europe/cs", "cs", "ces", "", "", "", SpeechSynthesis.GENDER_MALE, "Czech", "cs", "Toto je ukázkový text namluvený v jazyce čeština"),
  104. new Voice("cy", "europe/cy", "cy", "cym", "", "", "", SpeechSynthesis.GENDER_MALE, "Welsh", "cy", "This is a sample of text spoken in Welsh"),
  105. new Voice("da", "europe/da", "da", "dan", "", "", "", SpeechSynthesis.GENDER_MALE, "Danish", "da", "Dette er et eksempel på talt tekst på dansk"),
  106. new Voice("de", "de", "de", "deu", "", "", "", SpeechSynthesis.GENDER_MALE, "German", "de", "Dies ist ein Beispieltext auf Deutsch."),
  107. new Voice("el", "europe/el", "el", "ell", "", "", "", SpeechSynthesis.GENDER_MALE, "Greek (Modern)", "el", "Αυτό είναι ένα δείγμα κειμένου που εκφέρεται στα Ελληνικά"),
  108. new Voice("en", "default", "en", "eng", "", "", "", SpeechSynthesis.GENDER_MALE, "English", "en", "This is a sample of text spoken in English"),
  109. new Voice("en-sc", "other/en-sc", "en", "eng", "GB", "GBR", "scotland", SpeechSynthesis.GENDER_MALE, "English (Scotland)", "en-GB-scotland", "This is a sample of text spoken in English (United Kingdom,Scottish Standard English)"),
  110. new Voice("en-gb", "en", "en", "eng", "GB", "GBR", "", SpeechSynthesis.GENDER_MALE, "English (UK)", "en-GB", "This is a sample of text spoken in English (United Kingdom)"),
  111. new Voice("en-uk-north", "other/en-n", "en", "eng", "GB", "GBR", "north", SpeechSynthesis.GENDER_MALE, "English (Lancashire)", "en-GB-north", "This is a sample of text spoken in English (United Kingdom,NORTH)"),
  112. new Voice("en-uk-rp", "other/en-rp", "en", "eng", "GB", "GBR", "rp", SpeechSynthesis.GENDER_MALE, "English (Received Pronunciation)", "en-GB-rp", "This is a sample of text spoken in English (United Kingdom,RP)"),
  113. new Voice("en-uk-wmids", "other/en-wm", "en", "eng", "GB", "GBR", "wmids", SpeechSynthesis.GENDER_MALE, "English (West Midlands)", "en-GB-wmids", "This is a sample of text spoken in English (United Kingdom,WMIDS)"),
  114. new Voice("en-us", "en-us", "en", "eng", "US", "USA", "", SpeechSynthesis.GENDER_MALE, "English (US)", "en-US", "This is a sample of text spoken in English (United States)"),
  115. new Voice("en-wi", "other/en-wi", "en", "eng", "JM", "JAM", "", SpeechSynthesis.GENDER_MALE, "English (Caribbean)", "en-JM", "This is a sample of text spoken in English (Jamaica)"),
  116. new Voice("eo", "other/eo", "eo", "epo", "", "", "", SpeechSynthesis.GENDER_MALE, "Esperanto", "eo", "This is a sample of text spoken in Esperanto"),
  117. new Voice("es", "europe/es", "es", "spa", "", "", "", SpeechSynthesis.GENDER_MALE, "Spanish", "es", "Esto es un ejemplo de texto hablado en español."),
  118. new Voice("es-la", "es-la", "es", "spa", "MX", "MEX", "", SpeechSynthesis.GENDER_MALE, "Spanish (Latin America)", "es-MX", "Esto es un ejemplo de texto hablado en español (México)."),
  119. new Voice("et", "europe/et", "et", "est", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Estonian", "et", "This is a sample of text spoken in eesti", "This is a sample of text spoken in Estonian"),
  120. new Voice("fa", "asia/fa", "fa", "fas", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Farsi (Persian)", "fa", "این یک نمونه از نوشتار گفته شده در فارسی است"),
  121. new Voice("fi", "europe/fi", "fi", "fin", "", "", "", SpeechSynthesis.GENDER_MALE, "Finnish", "fi", "Tämä on näyte kielellä suomi puhutusta tekstistä"),
  122. new Voice("fr-be", "europe/fr-be", "fr", "fra", "BE", "BEL", "", SpeechSynthesis.GENDER_MALE, "French (Belgium)", "fr-BE", "Voici un exemple de texte énoncé en français (Belgique)."),
  123. new Voice("fr-fr", "fr", "fr", "fra", "FR", "FRA", "", SpeechSynthesis.GENDER_MALE, "French (France)", "fr-FR", "Voici un exemple de texte énoncé en français (France)."),
  124. new Voice("ga", "europe/ga", "ga", "gle", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Irish", "ga", "This is a sample of text spoken in Irish"),
  125. new Voice("grc", "other/grc", "grc", "grc", "", "", "", SpeechSynthesis.GENDER_MALE, "Greek (Ancient)", "grc", "This is a sample of text spoken in Ancient Greek"),
  126. new Voice("hi", "asia/hi", "hi", "hin", "", "", "", SpeechSynthesis.GENDER_MALE, "Hindi", "hi", "यह हिन्दी में बोले गए पाठ का नमूना है"),
  127. new Voice("hr", "europe/hr", "hr", "hrv", "", "", "", SpeechSynthesis.GENDER_MALE, "Croatian", "hr", "Ovo je primjer teksta izgovorenog na hrvatski"),
  128. new Voice("hu", "europe/hu", "hu", "hun", "", "", "", SpeechSynthesis.GENDER_MALE, "Hungarian", "hu", "Ez egy magyar nyelven felolvasott szöveg mintája."),
  129. new Voice("hy", "asia/hy", "hy", "hye", "", "", "", SpeechSynthesis.GENDER_MALE, "Armenian", "hy", "This is a sample of text spoken in Armenian"),
  130. new Voice("hy-west", "asia/hy-west", "hy", "hye", "", "", "arevmda", SpeechSynthesis.GENDER_MALE, "Armenian (Western)", "hy--arevmda", "This is a sample of text spoken in Armenian (Western Armenian)"),
  131. new Voice("id", "asia/id", "in", "ind", "", "", "", SpeechSynthesis.GENDER_MALE, "Indonesia", "in", "Ini adalah contoh teks yang diucapkan di Bahasa Indonesia"), // NOTE: 'id' is the correct ISO 639-1 code, but Android/Java uses 'in'.
  132. new Voice("is", "europe/is", "is", "isl", "", "", "", SpeechSynthesis.GENDER_MALE, "Icelandic", "is", "This is a sample of text spoken in íslenska", "This is a sample of text spoken in Icelandic"),
  133. new Voice("it", "europe/it", "it", "ita", "", "", "", SpeechSynthesis.GENDER_MALE, "Italian", "it", "Questo è un esempio di testo parlato in italiano"),
  134. new Voice("jbo", "other/jbo", "jbo", "jbo", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Lojban", "jbo", "This is a sample of text spoken in Lojban"),
  135. new Voice("ka", "asia/ka", "ka", "kat", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Georgian", "ka", "This is a sample of text spoken in Georgian"),
  136. new Voice("kl", "test/kl", "kl", "kal", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Greenlandic", "kl", "This is a sample of text spoken in Kalaallisut"),
  137. new Voice("kn", "asia/kn", "kn", "kan", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Kannada", "kn", "This is a sample of text spoken in Kannada"),
  138. new Voice("ko", "asia/ko", "ko", "kor", "", "", "", SpeechSynthesis.GENDER_MALE, "Korean", "ko", "한국어로 읽은 텍스트 샘플입니다."),
  139. new Voice("ku", "asia/ku", "ku", "kur", "", "", "", SpeechSynthesis.GENDER_MALE, "Kurdish", "ku", "This is a sample of text spoken in Kurdish"),
  140. new Voice("la", "other/la", "la", "lat", "", "", "", SpeechSynthesis.GENDER_MALE, "Latin", "la", "This is a sample of text spoken in Latin"),
  141. new Voice("lt", "europe/lt", "lt", "lit", "", "", "", SpeechSynthesis.GENDER_MALE, "Lithuanian", "lt", "Tai teksto, sakomo lietuvių, pavyzdys"),
  142. new Voice("lv", "europe/lv", "lv", "lav", "", "", "", SpeechSynthesis.GENDER_MALE, "Latvian", "lv", "Šis ir izrunāta teksta paraugs šādā valodā: latviešu."),
  143. new Voice("mk", "europe/mk", "mk", "mkd", "", "", "", SpeechSynthesis.GENDER_MALE, "Macedonian", "mk", "This is a sample of text spoken in Macedonian"),
  144. new Voice("ml", "asia/ml", "ml", "mal", "", "", "", SpeechSynthesis.GENDER_MALE, "Malayalam", "ml", "This is a sample of text spoken in Malayalam"),
  145. new Voice("ms", "asia/ms", "ms", "msa", "", "", "", SpeechSynthesis.GENDER_MALE, "Malayalam", "ms", "Ini adalah sampel teks yang dilafazkan dalam Bahasa Melayu", "Ini adalah sampel teks yang dilafazkan dalam Malay"),
  146. new Voice("ne", "asia/ne", "ne", "nep", "", "", "", SpeechSynthesis.GENDER_MALE, "Nepali", "ne", "This is a sample of text spoken in Nepali"),
  147. new Voice("nl", "europe/nl", "nl", "nld", "", "", "", SpeechSynthesis.GENDER_MALE, "Dutch", "nl", "Dit is een voorbeeld van tekst die is uitgesproken in het Nederlands"),
  148. new Voice("no", "europe/no", "no", "nor", "", "", "", SpeechSynthesis.GENDER_MALE, "Norwegian", "no", "This is a sample of text spoken in Norwegian"),
  149. new Voice("pa", "asia/pa", "pa", "pan", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Panjabi", "pa", "This is a sample of text spoken in Punjabi"),
  150. new Voice("pap", "test/pap", "pap", "pap", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Papiamento", "pap", "This is a sample of text spoken in Papiamento"),
  151. new Voice("pl", "europe/pl", "pl", "pol", "", "", "", SpeechSynthesis.GENDER_MALE, "Polish", "pl", "To jest przykład tekstu mówionego przy ustawieniu polski"),
  152. new Voice("pt-br", "pt", "pt", "por", "BR", "BRA", "", SpeechSynthesis.GENDER_MALE, "Portuguese (Brazil)", "pt-BR", "Esta é uma amostra de texto falado em português (Brasil)"),
  153. new Voice("pt-pt", "europe/pt-pt", "pt", "por", "PT", "PRT", "", SpeechSynthesis.GENDER_MALE, "Portuguese (Portugal)", "pt-PT", "Este é um exemplo de texto falado em português (Portugal)"),
  154. new Voice("ro", "europe/ro", "ro", "ron", "", "", "", SpeechSynthesis.GENDER_MALE, "Romanian", "ro", "Aceasta este o mostră de text vorbit în română"),
  155. new Voice("ru", "europe/ru", "ru", "rus", "", "", "", SpeechSynthesis.GENDER_MALE, "Russian", "ru", "Так синтезатор речи озвучивает русский текст"),
  156. new Voice("si", "test/si", "si", "sin", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Sinhalese", "si", "This is a sample of text spoken in Sinhala"),
  157. new Voice("sk", "europe/sk", "sk", "slk", "", "", "", SpeechSynthesis.GENDER_MALE, "Slovak", "sk", "Toto je ukážkový text nahovorený v jazyku slovenčina"),
  158. new Voice("sl", "test/sl", "sl", "slv", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Slovenian", "sl", "To je vzorec besedila, izgovorjen v slovenščina"),
  159. new Voice("sq", "europe/sq", "sq", "sqi", "", "", "", SpeechSynthesis.GENDER_MALE, "Albanian", "sq", "This is a sample of text spoken in Albanian"),
  160. new Voice("sr", "europe/sr", "sr", "srp", "", "", "", SpeechSynthesis.GENDER_MALE, "Serbian", "sr", "Ово је пример текста који је изговорен на језику Српски"),
  161. new Voice("sv", "europe/sv", "sv", "swe", "", "", "", SpeechSynthesis.GENDER_MALE, "Swedish", "sv", "Detta är ett textexempel som läses på svenska"),
  162. new Voice("sw", "other/sw", "sw", "swa", "", "", "", SpeechSynthesis.GENDER_MALE, "Swahili", "sw", "Hii ni sampuli ya maandishi yaliyonenwa katika Kiswahili", "Hii ni sampuli ya maandishi yaliyonenwa katika Swahili"),
  163. new Voice("ta", "asia/ta", "ta", "tam", "", "", "", SpeechSynthesis.GENDER_MALE, "Tamil", "ta", "This is a sample of text spoken in தமிழ்", "This is a sample of text spoken in Tamil"),
  164. new Voice("te", "test/te", "te", "tel", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Telugu", "te", "This is a sample of text spoken in Telugu"),
  165. new Voice("tr", "asia/tr", "tr", "tur", "", "", "", SpeechSynthesis.GENDER_MALE, "Turkish", "tr", "Bu, Türkçe dilinde seslendirilen örnek bir metindir"),
  166. new Voice("ur", "test/ur", "ur", "urd", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Urdu", "ur", "This is a sample of text spoken in Urdu"),
  167. 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"),
  168. 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)"),
  169. 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)"),
  170. new Voice("zh", "asia/zh", "zh", "zho", "", "", "", SpeechSynthesis.GENDER_MALE, "Chinese (Mandarin)", "zh", "This is a sample of text spoken in 中文"),
  171. 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 中文 (中華人民共和國香港特別行政區)", "This is a sample of text spoken in 中文 (香港)"),
  172. };
  173. }