Browse Source

phoneme_add_feature: support the lat and sib phonemes.

master
Reece H. Dunn 8 years ago
parent
commit
56b9eeeb72
2 changed files with 9 additions and 1 deletions
  1. 1
    1
      src/libespeak-ng/compiledata.c
  2. 8
    0
      src/libespeak-ng/phoneme.c

+ 1
- 1
src/libespeak-ng/compiledata.c View File

@@ -298,7 +298,7 @@ static keywtab_t keywords[] = {
{ "wavef", tPHONEME_FLAG, phWAVE },
{ "unstressed", tPHONEME_FLAG, phUNSTRESSED },
{ "fortis", tPHONEME_FLAG, phFORTIS },
{ "sibilant", tPHONEME_FLAG, phSIBILANT },
{ "sibilant", tPHONEME_FLAG, phSIBILANT }, // TODO (deprecated): use 'sib' instead
{ "nolink", tPHONEME_FLAG, phNOLINK },
{ "trill", tPHONEME_FLAG, phTRILL }, // TODO (deprecated): use 'trl' instead
{ "vowel2", tPHONEME_FLAG, phVOWEL2 },

+ 8
- 0
src/libespeak-ng/phoneme.c View File

@@ -42,6 +42,8 @@ enum feature_t {
ejc,
imp,
vwl,
lat,
sib,
};

static MNEM_TAB features[] = {
@@ -57,6 +59,8 @@ static MNEM_TAB features[] = {
{ "ejc", ejc },
{ "imp", imp },
{ "vwl", vwl },
{ "lat", lat },
{ "sib", sib },
// invalid phoneme feature
{ NULL, inv },
};
@@ -91,11 +95,15 @@ phoneme_add_feature(PHONEME_TAB *phoneme,
case clk:
case ejc:
case imp:
case lat:
// Not supported by eSpeak.
break;
case vwl:
phoneme->type = phVOWEL;
break;
case sib:
phoneme->phflags |= phSIBILANT;
break;
// invalid phoneme feature
default:
return create_name_error_context(context, ENS_UNKNOWN_PHONEME_FEATURE, feature);

Loading…
Cancel
Save