mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 21:39:47 +00:00
[1.24.12] Produce dictsource/dict_phonemes, a list of which phonemes are used by each language's *_rules and *_list files.
Fix crash with -X option when spelling words (acronyms). Rules files: added special character X meaning "no vowel until the word boundary". Used for lang=no. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@14 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+13
-2
@@ -373,10 +373,12 @@ void VowelChart(int control, char *fname)
|
||||
|
||||
|
||||
|
||||
static void FindPhonemesUsed(void)
|
||||
{//===============================
|
||||
void FindPhonemesUsed(void)
|
||||
{//========================
|
||||
int hash;
|
||||
char *p;
|
||||
char *start;
|
||||
char *group;
|
||||
char *next;
|
||||
unsigned char c;
|
||||
int count = 0;
|
||||
@@ -386,15 +388,24 @@ static void FindPhonemesUsed(void)
|
||||
p = translator->data_dictrules;
|
||||
while(*p != 0)
|
||||
{
|
||||
if(*p == RULE_CONDITION)
|
||||
p+=2;
|
||||
if(*p == RULE_GROUP_END)
|
||||
{
|
||||
p++;
|
||||
if(*p == 0) break;
|
||||
}
|
||||
if(*p == RULE_GROUP_START)
|
||||
{
|
||||
group = p;
|
||||
p += (strlen(p)+1);
|
||||
}
|
||||
|
||||
while((((c = *p) != RULE_PHONEMES)) && (c != 0)) p++;
|
||||
count++;
|
||||
if(c == RULE_PHONEMES)
|
||||
{
|
||||
start = p;
|
||||
p++;
|
||||
while(*p != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user