mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-17 10:32:15 +00:00
[Android 5.0] TTS settings crashes on hye-arevmda
This commit is contained in:
@@ -285,31 +285,6 @@ public class SpeechSynthesisTest extends TextToSpeechTestCase
|
||||
assertThat(voice.match(fra_BEL_1694acad), isTtsLangCode(TextToSpeech.LANG_AVAILABLE));
|
||||
}
|
||||
|
||||
public void testMatchVoiceWithLanguageAndVariant()
|
||||
{
|
||||
final Voice voice = getVoice("hy-west"); // language="hy" country="" variant="arevmda"
|
||||
assertThat(voice, is(notNullValue()));
|
||||
|
||||
assertThat(voice.match(fr), isTtsLangCode(TextToSpeech.LANG_NOT_SUPPORTED));
|
||||
assertThat(voice.match(fr_BE), isTtsLangCode(TextToSpeech.LANG_NOT_SUPPORTED));
|
||||
assertThat(voice.match(fr_1694acad), isTtsLangCode(TextToSpeech.LANG_NOT_SUPPORTED));
|
||||
assertThat(voice.match(fr_FR_1694acad), isTtsLangCode(TextToSpeech.LANG_NOT_SUPPORTED));
|
||||
|
||||
assertThat(voice.match(hy), isTtsLangCode(TextToSpeech.LANG_COUNTRY_AVAILABLE));
|
||||
assertThat(voice.match(hy_AM), isTtsLangCode(TextToSpeech.LANG_AVAILABLE));
|
||||
assertThat(voice.match(hy_arevela), isTtsLangCode(TextToSpeech.LANG_COUNTRY_AVAILABLE));
|
||||
assertThat(voice.match(hy_arevmda), isTtsLangCode(TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE));
|
||||
assertThat(voice.match(hy_AM_arevela), isTtsLangCode(TextToSpeech.LANG_AVAILABLE));
|
||||
assertThat(voice.match(hy_AM_arevmda), isTtsLangCode(TextToSpeech.LANG_AVAILABLE)); // NOTE: Android does not support LANG_VAR_AVAILABLE.
|
||||
|
||||
assertThat(voice.match(hye), isTtsLangCode(TextToSpeech.LANG_COUNTRY_AVAILABLE));
|
||||
assertThat(voice.match(hye_ARM), isTtsLangCode(TextToSpeech.LANG_AVAILABLE));
|
||||
assertThat(voice.match(hye_arevela), isTtsLangCode(TextToSpeech.LANG_COUNTRY_AVAILABLE));
|
||||
assertThat(voice.match(hye_arevmda), isTtsLangCode(TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE));
|
||||
assertThat(voice.match(hye_ARM_arevela), isTtsLangCode(TextToSpeech.LANG_AVAILABLE));
|
||||
assertThat(voice.match(hye_ARM_arevmda), isTtsLangCode(TextToSpeech.LANG_AVAILABLE)); // NOTE: Android does not support LANG_VAR_AVAILABLE.
|
||||
}
|
||||
|
||||
public void testMatchVoiceWithLanguageCountryAndVariant()
|
||||
{
|
||||
final Voice voice = getVoice("en-sc"); // language="en" country="GB" variant="scotland"
|
||||
|
||||
@@ -139,7 +139,7 @@ public class VoiceData
|
||||
new Voice("hr", "europe/hr", "hr", "hrv", "", "", "", SpeechSynthesis.GENDER_MALE, "Croatian", "hrv", "Ovo je primjer teksta izgovorenog na hrvatski"),
|
||||
new Voice("hu", "europe/hu", "hu", "hun", "", "", "", SpeechSynthesis.GENDER_MALE, "Hungarian", "hun", "Ez egy magyar nyelven felolvasott szöveg mintája."),
|
||||
new Voice("hy", "asia/hy", "hy", "hye", "", "", "", SpeechSynthesis.GENDER_MALE, "Armenian", "hye", "This is a sample of text spoken in Armenian", "This is a sample of text spoken in հայերեն"),
|
||||
new Voice("hy-west", "asia/hy-west", "hy", "hye", "", "", "arevmda", SpeechSynthesis.GENDER_MALE, "Armenian (Western)", "hye-arevmda", "This is a sample of text spoken in Armenian (Western Armenian)", "This is a sample of text spoken in հայերեն (AREVMDA)"),
|
||||
// new Voice("hy-west", "asia/hy-west", "hy", "hye", "", "", "arevmda", SpeechSynthesis.GENDER_MALE, "Armenian (Western)", "hye-arevmda", "This is a sample of text spoken in Armenian (Western Armenian)", "This is a sample of text spoken in հայերեն (AREVMDA)"),
|
||||
new Voice("ia", "other/ia", "ia", "ina", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Interlingua", "ina", "This is a sample of text spoken in Interlingua"),
|
||||
new Voice("id", "asia/id", "in", "ind", "", "", "", SpeechSynthesis.GENDER_MALE, "Indonesia", "ind", "Ini adalah sebuah contoh teks yang diucapkan di Bahasa Indonesia"), // NOTE: 'id' is the correct ISO 639-1 code, but Android/Java uses 'in'.
|
||||
new Voice("is", "europe/is", "is", "isl", "", "", "", SpeechSynthesis.GENDER_MALE, "Icelandic", "isl", "This is a sample of text spoken in íslenska", "This is a sample of text spoken in Icelandic"),
|
||||
|
||||
@@ -139,7 +139,7 @@ public class SpeechSynthesis {
|
||||
locale = new Locale("es", "MX");
|
||||
} else if (name.equals("hy-west")) {
|
||||
// 'west' is not a country code.
|
||||
locale = new Locale("hy", "", "arevmda");
|
||||
locale = null;
|
||||
} else if (name.equals("vi-hue")) {
|
||||
// 'hue' is for the Hue Province accent/dialect (Central Vietnamese).
|
||||
locale = new Locale("vi", "VN", "hue");
|
||||
|
||||
Reference in New Issue
Block a user