mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
Remove voice/language support for alphabet2.
This is not used by any of the espeak-ng voices and languages. Additionally, this functionality would be superceded by support for specifying the language used by different scripts in the language argument on the command line.
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
- [stressAmp](#stressamp)
|
||||
- [intonation](#intonation)
|
||||
- [dictmin](#dictmin)
|
||||
- [alphabet2](#alphabet2)
|
||||
|
||||
----------
|
||||
|
||||
@@ -425,19 +424,3 @@ Used for some languages to detect if additional language data is
|
||||
installed. If the size of the compiled dictionary data for the language
|
||||
(the file `espeak-ng-data/*_dict`) is less than this size then a
|
||||
warning is given.
|
||||
|
||||
### alphabet2
|
||||
|
||||
alphabet2 <alphabet> <language>
|
||||
|
||||
Used to specify a language to be used to speak words which are written
|
||||
in a non-native alphabet. e.g.:
|
||||
|
||||
alphabet2 cyr ru
|
||||
|
||||
Alphabets names include: latin, cyr (cyrillic), ar (arabic). The default
|
||||
language for latin alphabet is English.
|
||||
|
||||
Additional attributes are available to set various internal options
|
||||
which control how language is processed. These would normally be set in
|
||||
the program code rather than in a voice file.
|
||||
|
||||
@@ -2290,14 +2290,6 @@ int TranslateRules(Translator *tr, char *p_start, char *phonemes, int ph_size, c
|
||||
if ((match1.points == 0) && ((option_sayas & 0x10) == 0)) {
|
||||
n = utf8_in(&letter, p-1)-1;
|
||||
|
||||
if (tr->letter_bits_offset > 0) {
|
||||
// not a Latin alphabet, switch to the default Latin alphabet language
|
||||
if ((letter <= 0x241) && iswalpha(letter)) {
|
||||
sprintf(phonemes, "%c%s", phonSWITCH, tr->langopts.ascii_language);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// is it a bracket ?
|
||||
if (letter == 0xe000+'(') {
|
||||
if (pre_pause < tr->langopts.param2[LOPT_BRACKET_PAUSE])
|
||||
|
||||
@@ -100,17 +100,6 @@ ALPHABET alphabets[] = {
|
||||
{ NULL, 0, 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
ALPHABET *AlphabetFromName(const char *name)
|
||||
{
|
||||
ALPHABET *alphabet;
|
||||
|
||||
for (alphabet = alphabets; alphabet->name != NULL; alphabet++) {
|
||||
if (strcmp(name, &alphabet->name[1]) == 0)
|
||||
return alphabet;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ALPHABET *AlphabetFromChar(int c)
|
||||
{
|
||||
// Find the alphabet from a character.
|
||||
@@ -277,7 +266,6 @@ static Translator *NewTranslator(void)
|
||||
tr->langopts.param2[LOPT_BRACKET_PAUSE] = 2; // pauses when announcing bracket names
|
||||
tr->langopts.max_initial_consonants = 3;
|
||||
tr->langopts.replace_chars = NULL;
|
||||
tr->langopts.ascii_language[0] = 0; // Non-Latin alphabet languages, use this language to speak Latin words, default is English
|
||||
tr->langopts.alt_alphabet_lang = L('e', 'n');
|
||||
tr->langopts.roman_suffix = utf8_null;
|
||||
|
||||
|
||||
@@ -570,7 +570,6 @@ typedef struct {
|
||||
int testing; // testing options: bit 1= specify stressed syllable in the form: "outdoor/2"
|
||||
int listx; // compile *_listx after *list
|
||||
const unsigned int *replace_chars; // characters to be substitutes
|
||||
char ascii_language[8]; // switch to this language for Latin characters
|
||||
int our_alphabet; // offset for main alphabet (if not set in letter_bits_offset)
|
||||
int alt_alphabet; // offset for another language to recognize
|
||||
int alt_alphabet_lang; // language for the alt_alphabet
|
||||
@@ -733,7 +732,6 @@ int towlower2(unsigned int c); // Supports Turkish I
|
||||
const char *GetTranslatedPhonemeString(int phoneme_mode);
|
||||
const char *WordToString2(unsigned int word);
|
||||
ALPHABET *AlphabetFromChar(int c);
|
||||
ALPHABET *AlphabetFromName(const char *name);
|
||||
|
||||
Translator *SelectTranslator(const char *name);
|
||||
int SetTranslator2(const char *name);
|
||||
|
||||
@@ -158,7 +158,6 @@ static MNEM_TAB keyword_tab[] = {
|
||||
{ "fast_test2", V_FAST },
|
||||
{ "speed", V_SPEED },
|
||||
{ "dict_min", V_DICTMIN },
|
||||
{ "alphabet2", V_ALPHABET2 },
|
||||
|
||||
// these just set a value in langopts.param[]
|
||||
{ "l_dieresis", 0x100+LOPT_DIERESES },
|
||||
@@ -847,21 +846,6 @@ voice_t *LoadVoice(const char *vname, int control)
|
||||
case V_DICTMIN:
|
||||
sscanf(p, "%d", &dict_min);
|
||||
break;
|
||||
case V_ALPHABET2:
|
||||
{
|
||||
ALPHABET *alphabet;
|
||||
name1[0] = name2[0] = 0;
|
||||
sscanf(p, "%s %s", name1, name2);
|
||||
|
||||
if (strcmp(name1, "latin") == 0)
|
||||
strncpy0(langopts->ascii_language, name2, sizeof(langopts->ascii_language));
|
||||
else if ((alphabet = AlphabetFromName(name1)) != 0) {
|
||||
langopts->alt_alphabet = alphabet->offset;
|
||||
langopts->alt_alphabet_lang = StringToWord2(name2);
|
||||
} else
|
||||
fprintf(stderr, "alphabet name '%s' not found\n", name1);
|
||||
}
|
||||
break;
|
||||
case V_MAINTAINER:
|
||||
case V_STATUS:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user