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 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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 Voice(String name,
  34. String identifier,
  35. String ianaLanguage,
  36. String javaLanguage,
  37. String ianaCountry,
  38. String javaCountry,
  39. String variant,
  40. int gender,
  41. String displayName,
  42. String locale)
  43. {
  44. this.name = name;
  45. this.identifier = identifier;
  46. this.ianaLanguage = ianaLanguage;
  47. this.javaLanguage = javaLanguage;
  48. this.ianaCountry = ianaCountry;
  49. this.javaCountry = javaCountry;
  50. this.variant = variant;
  51. this.gender = gender;
  52. this.displayName = displayName;
  53. this.locale = locale;
  54. this.sampleText = displayName;
  55. }
  56. public Voice(String name,
  57. String identifier,
  58. String ianaLanguage,
  59. String javaLanguage,
  60. String ianaCountry,
  61. String javaCountry,
  62. String variant,
  63. int gender,
  64. String displayName)
  65. {
  66. this.name = name;
  67. this.identifier = identifier;
  68. this.ianaLanguage = ianaLanguage;
  69. this.javaLanguage = javaLanguage;
  70. this.ianaCountry = ianaCountry;
  71. this.javaCountry = javaCountry;
  72. this.variant = variant;
  73. this.gender = gender;
  74. this.displayName = displayName;
  75. this.locale = ianaLanguage;
  76. this.sampleText = displayName;
  77. }
  78. public Voice(String name,
  79. String identifier,
  80. String ianaLanguage,
  81. String javaLanguage,
  82. String ianaCountry,
  83. String javaCountry,
  84. String variant,
  85. int gender,
  86. String displayName,
  87. String locale,
  88. String sampleText)
  89. {
  90. this.name = name;
  91. this.identifier = identifier;
  92. this.ianaLanguage = ianaLanguage;
  93. this.javaLanguage = javaLanguage;
  94. this.ianaCountry = ianaCountry;
  95. this.javaCountry = javaCountry;
  96. this.variant = variant;
  97. this.gender = gender;
  98. this.displayName = displayName;
  99. this.locale = locale;
  100. this.sampleText = sampleText;
  101. }
  102. }
  103. public static class Exception extends AssertionError
  104. {
  105. private static final long serialVersionUID = 1L;
  106. public Exception(Voice voice, AssertionError context)
  107. {
  108. super("Voice \"" + voice.name + "\" -- " + context);
  109. }
  110. }
  111. public static final Voice[] voices = new Voice[] {
  112. new Voice("af", "af", "af", "afr", "", "", "", SpeechSynthesis.GENDER_MALE, "Afrikaans", "af", "Hierdie is 'n voorbeeld van gesproke teks in Afrikaans"),
  113. new Voice("ak", "test/ak", "ak", "aka", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Akan", "ak", "This is a sample of text spoken in Akan"),
  114. new Voice("am", "test/am", "am", "amh", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Amharic", "am", "ይሄ በአማርኛ ላይ የተነገረ ጽሑፍ ናሙና ነው።"),
  115. new Voice("an", "test/an", "an", "arg", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Aragonese", "an", "This is a sample of text spoken in Aragonese"),
  116. new Voice("az", "test/az", "az", "aze", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Azerbaijani", "az", "This is a sample of text spoken in Azerbaijani"),
  117. new Voice("bg", "test/bg", "bg", "bul", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Bulgarian", "bg", "Това е откъс от изговорен текст на български"),
  118. new Voice("bs", "bs", "bs", "bos", "", "", "", SpeechSynthesis.GENDER_MALE, "Bosnian", "bs", "This is a sample of text spoken in Bosnian"),
  119. new Voice("ca", "ca", "ca", "cat", "", "", "", SpeechSynthesis.GENDER_MALE, "Catalan", "ca", "Aquesta és una mostra de text dit en veu alta en català"),
  120. new Voice("cs", "cs", "cs", "ces", "", "", "", SpeechSynthesis.GENDER_MALE, "Czech", "cs", "Toto je ukázkový text namluvený v jazyce čeština"),
  121. new Voice("cy", "cy", "cy", "cym", "", "", "", SpeechSynthesis.GENDER_MALE, "Welsh", "cy", "This is a sample of text spoken in Welsh"),
  122. new Voice("da", "da", "da", "dan", "", "", "", SpeechSynthesis.GENDER_MALE, "Danish", "da", "Dette er et eksempel på talt tekst på dansk"),
  123. new Voice("de", "de", "de", "deu", "", "", "", SpeechSynthesis.GENDER_MALE, "German", "de", "Dies ist ein Beispieltext auf Deutsch."),
  124. new Voice("dv", "test/dv", "dv", "div", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Divehi", "dv", "This is a sample of text spoken in Divehi"),
  125. new Voice("el", "el", "el", "ell", "", "", "", SpeechSynthesis.GENDER_MALE, "Greek (Modern)", "el", "Αυτό είναι ένα δείγμα κειμένου που εκφέρεται στα Ελληνικά"),
  126. new Voice("en", "default", "en", "eng", "", "", "", SpeechSynthesis.GENDER_MALE, "English", "en", "This is a sample of text spoken in English"),
  127. new Voice("en-sc", "en/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)"),
  128. new Voice("en-uk", "en/en", "en", "eng", "GB", "GBR", "", SpeechSynthesis.GENDER_MALE, "English (UK)", "en-GB", "This is a sample of text spoken in English (United Kingdom)"),
  129. new Voice("en-uk-north", "en/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)"),
  130. new Voice("en-uk-rp", "en/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)"),
  131. new Voice("en-uk-wmids", "en/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)"),
  132. new Voice("en-us", "en/en-us", "en", "eng", "US", "USA", "", SpeechSynthesis.GENDER_MALE, "English (US)", "en-US", "This is a sample of text spoken in English (United States)"),
  133. new Voice("en-wi", "en/en-wi", "en", "eng", "029", "", "", SpeechSynthesis.GENDER_MALE, "English (Caribbean)", "en-029", "This is a sample of text spoken in English"),
  134. new Voice("eo", "eo", "eo", "epo", "", "", "", SpeechSynthesis.GENDER_MALE, "Esperanto", "eo", "This is a sample of text spoken in Esperanto"),
  135. new Voice("es", "es", "es", "spa", "", "", "", SpeechSynthesis.GENDER_MALE, "Spanish", "es", "Esto es un ejemplo de texto hablado en español."),
  136. new Voice("es-la", "es-la", "es", "spa", "419", "", "", SpeechSynthesis.GENDER_MALE, "Spanish (Latin America)", "es-419", "Esto es un ejemplo de texto hablado en español."),
  137. new Voice("et", "et", "et", "est", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Estonian", "et", "This is a sample of text spoken in eesti"),
  138. new Voice("fa", "test/fa", "fa", "fas", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Farsi (Persian)", "fa", "این یک نمونه از نوشتار گفته شده در فارسی است"),
  139. new Voice("fi", "fi", "fi", "fin", "", "", "", SpeechSynthesis.GENDER_MALE, "Finnish", "fi", "Tämä on näyte kielellä suomi puhutusta tekstistä"),
  140. new Voice("fr-be", "fr-be", "fr", "fra", "BE", "BEL", "", SpeechSynthesis.GENDER_MALE, "French (Belgium)", "fr-BE", "Voici un exemple de texte énoncé en français (Belgique)."),
  141. 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)."),
  142. new Voice("ga", "test/ga", "ga", "gle", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Irish", "ga", "This is a sample of text spoken in Irish"),
  143. new Voice("grc", "test/grc", "grc", "grc", "", "", "", SpeechSynthesis.GENDER_MALE, "Greek (Ancient)", "grc", "This is a sample of text spoken in Ancient Greek"),
  144. new Voice("hi", "hi", "hi", "hin", "", "", "", SpeechSynthesis.GENDER_MALE, "Hindi", "hi", "यह हिन्दी में बोले गए पाठ का नमूना है"),
  145. new Voice("hr", "hr", "hr", "hrv", "", "", "", SpeechSynthesis.GENDER_MALE, "Croatian", "hr", "Ovo je primjer teksta izgovorenog na hrvatski"),
  146. new Voice("ht", "test/ht", "ht", "hat", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Haitian Creole", "ht", "This is a sample of text spoken in Haitian"),
  147. new Voice("hu", "hu", "hu", "hun", "", "", "", SpeechSynthesis.GENDER_MALE, "Hungarian", "hu", "Ez egy magyar nyelven felolvasott szöveg mintája."),
  148. new Voice("hy", "hy", "hy", "hye", "", "", "", SpeechSynthesis.GENDER_MALE, "Armenian", "hy", "This is a sample of text spoken in Armenian"),
  149. new Voice("hy-west", "hy-west", "hy", "hye", "", "", "arevmda", SpeechSynthesis.GENDER_MALE, "Armenian (Western)", "hy--arevmda", "This is a sample of text spoken in Armenian (Western Armenian)"),
  150. new Voice("id", "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'.
  151. new Voice("is", "is", "is", "isl", "", "", "", SpeechSynthesis.GENDER_MALE, "Icelandic", "is", "This is a sample of text spoken in Icelandic"),
  152. new Voice("it", "it", "it", "ita", "", "", "", SpeechSynthesis.GENDER_MALE, "Italian", "it", "Questo è un esempio di testo parlato in italiano"),
  153. new Voice("jbo", "test/jbo", "jbo", "jbo", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Lojban", "jbo", "This is a sample of text spoken in Lojban"),
  154. new Voice("ka", "ka", "ka", "kat", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Georgian", "ka", "This is a sample of text spoken in Georgian"),
  155. new Voice("kk", "test/kk", "kk", "kaz", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Kazakh", "kk", "This is a sample of text spoken in Kazakh"),
  156. new Voice("kl", "test/kl", "kl", "kal", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Greenlandic", "kl", "This is a sample of text spoken in Kalaallisut"),
  157. new Voice("kn", "kn", "kn", "kan", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Kannada", "kn", "This is a sample of text spoken in Kannada"),
  158. new Voice("ko", "test/ko", "ko", "kor", "", "", "", SpeechSynthesis.GENDER_MALE, "Korean", "ko", "한국어로 읽은 텍스트 샘플입니다."),
  159. new Voice("ku", "ku", "ku", "kur", "", "", "", SpeechSynthesis.GENDER_MALE, "Kurdish", "ku", "This is a sample of text spoken in Kurdish"),
  160. new Voice("la", "la", "la", "lat", "", "", "", SpeechSynthesis.GENDER_MALE, "Latin", "la", "This is a sample of text spoken in Latin"),
  161. new Voice("lt", "test/lt", "lt", "lit", "", "", "", SpeechSynthesis.GENDER_MALE, "Lithuanian", "lt", "Tai teksto, sakomo lietuvių, pavyzdys"),
  162. new Voice("lv", "lv", "lv", "lav", "", "", "", SpeechSynthesis.GENDER_MALE, "Latvian", "lv", "Šis ir izrunāta teksta paraugs šādā valodā: latviešu."),
  163. new Voice("mk", "mk", "mk", "mkd", "", "", "", SpeechSynthesis.GENDER_MALE, "Macedonian", "mk", "This is a sample of text spoken in Macedonian"),
  164. new Voice("ml", "ml", "ml", "mal", "", "", "", SpeechSynthesis.GENDER_MALE, "Malayalam", "ml", "This is a sample of text spoken in Malayalam"),
  165. new Voice("mt", "test/mt", "mt", "mlt", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Maltese", "mt", "This is a sample of text spoken in Maltese"),
  166. new Voice("nci", "test/nci", "nci", "", "", "", "", SpeechSynthesis.GENDER_MALE, "Classical Nahuatl", "nci", "This is a sample of text spoken in nci"),
  167. new Voice("ne", "test/ne", "ne", "nep", "", "", "", SpeechSynthesis.GENDER_MALE, "Nepali", "ne", "This is a sample of text spoken in Nepali"),
  168. new Voice("nl", "nl", "nl", "nld", "", "", "", SpeechSynthesis.GENDER_MALE, "Dutch", "nl", "Dit is een voorbeeld van tekst die is uitgesproken in het Nederlands"),
  169. new Voice("no", "no", "no", "nor", "", "", "", SpeechSynthesis.GENDER_MALE, "Norwegian", "no", "This is a sample of text spoken in Norwegian"),
  170. new Voice("nso", "test/nso", "nso", "nso", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Sotho (Northern)", "nso", "This is a sample of text spoken in Northern Sotho"),
  171. new Voice("pa", "test/pa", "pa", "pan", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Panjabi", "pa", "This is a sample of text spoken in Punjabi"),
  172. new Voice("pap", "test/pap", "pap", "pap", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Papiamento", "pap", "This is a sample of text spoken in Papiamento"),
  173. new Voice("pl", "pl", "pl", "pol", "", "", "", SpeechSynthesis.GENDER_MALE, "Polish", "pl", "To jest przykład tekstu mówionego przy ustawieniu polski"),
  174. new Voice("prs", "test/prs", "prs", "", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Dari (Afghan Persian)", "prs", "This is a sample of text spoken in prs"),
  175. new Voice("pt-br", "pt", "pt", "por", "BR", "BRA", "", SpeechSynthesis.GENDER_MALE, "Portuguese (Brazil)", "pt-BR", "Este é um exemplo de texto falado em português (Brasil)"),
  176. new Voice("pt-pt", "pt-pt", "pt", "por", "PT", "PRT", "", SpeechSynthesis.GENDER_MALE, "Portuguese (Portugal)", "pt-PT", "Este é um exemplo de texto falado em português (Portugal)"),
  177. new Voice("ro", "ro", "ro", "ron", "", "", "", SpeechSynthesis.GENDER_MALE, "Romanian", "ro", "Aceasta este o mostră de text vorbit în română"),
  178. new Voice("ru", "ru", "ru", "rus", "", "", "", SpeechSynthesis.GENDER_MALE, "Russian", "ru", "Так синтезатор речи озвучивает русский текст"),
  179. new Voice("rw", "test/rw", "rw", "kin", "", "", "", SpeechSynthesis.GENDER_MALE, "Kinyarwanda", "rw", "This is a sample of text spoken in Kinyarwanda"),
  180. new Voice("si", "test/si", "si", "sin", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Sinhalese", "si", "This is a sample of text spoken in Sinhala"),
  181. new Voice("sk", "sk", "sk", "slk", "", "", "", SpeechSynthesis.GENDER_MALE, "Slovak", "sk", "Toto je ukážkový text nahovorený v jazyku slovenčina"),
  182. new Voice("sl", "test/sl", "sl", "slv", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Slovenian", "sl", "To je vzorec besedila, izgovorjen v slovenščina"),
  183. new Voice("sq", "sq", "sq", "sqi", "", "", "", SpeechSynthesis.GENDER_MALE, "Albanian", "sq", "This is a sample of text spoken in Albanian"),
  184. new Voice("sr", "sr", "sr", "srp", "", "", "", SpeechSynthesis.GENDER_MALE, "Serbian", "sr", "Ово је пример текста који је изговорен на језику Српски"),
  185. new Voice("sv", "sv", "sv", "swe", "", "", "", SpeechSynthesis.GENDER_MALE, "Swedish", "sv", "Detta är ett textexempel som läses på svenska"),
  186. new Voice("sw", "sw", "sw", "swa", "", "", "", SpeechSynthesis.GENDER_MALE, "Swahili", "sw", "Hii ni sampuli ya maandishi yaliyonenwa katika Kiswahili"),
  187. new Voice("ta", "ta", "ta", "tam", "", "", "", SpeechSynthesis.GENDER_MALE, "Tamil", "ta", "This is a sample of text spoken in Tamil"),
  188. new Voice("te", "test/te", "te", "tel", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Telugu", "te", "This is a sample of text spoken in Telugu"),
  189. new Voice("tn", "test/tn", "tn", "tsn", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Setswana", "tn", "This is a sample of text spoken in Tswana"),
  190. new Voice("tr", "tr", "tr", "tur", "", "", "", SpeechSynthesis.GENDER_MALE, "Turkish", "tr", "Bu, Türkçe dilinde seslendirilen örnek bir metindir"),
  191. new Voice("tt", "test/tt", "tt", "tat", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Tatar", "tt", "This is a sample of text spoken in Tatar"),
  192. new Voice("ur", "test/ur", "ur", "urd", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Urdu", "ur", "This is a sample of text spoken in Urdu"),
  193. 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"),
  194. new Voice("wo", "test/wo", "wo", "wol", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Wolof", "wo", "This is a sample of text spoken in Wolof"),
  195. new Voice("zh", "zh", "zh", "zho", "", "", "", SpeechSynthesis.GENDER_MALE, "Chinese (Mandarin)", "zh", "This is a sample of text spoken in 中文"),
  196. 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 中文 (中華人民共和國香港特別行政區)"),
  197. };
  198. }